don't do an end tag for empty elements
darcs-hash:20080708233218-84dde-45850157b8fce2ac1d5c1d16a4fdb4fbcc817b76.gz
This commit is contained in:
parent
ca4fed34b5
commit
91af9de7e4
|
@ -93,10 +93,17 @@ function common_element_start($tag, $attrs=NULL) {
|
|||
}
|
||||
|
||||
function common_element_end($tag) {
|
||||
static $empty_tag = array('base', 'meta', 'link', 'hr',
|
||||
'br', 'param', 'img', 'area',
|
||||
'input', 'col');
|
||||
global $xw;
|
||||
# TODO: switch based on $tag
|
||||
# TODO check namespace
|
||||
if (in_array($tag, $empty_tag)) {
|
||||
$xw->endElement();
|
||||
} else {
|
||||
$xw->fullEndElement();
|
||||
}
|
||||
}
|
||||
|
||||
function common_element($tag, $attrs=NULL, $content=NULL) {
|
||||
common_element_start($tag, $attrs);
|
||||
|
|
Loading…
Reference in New Issue
Block a user