mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 06:07:26 +02:00
Finish HTMLDTD_ChildDef_Required.
Fix bug in HTML_Generator that resulted in attribute-less empty elements to have extra spaces in them. Add whitespace designation to MF_Text. git-svn-id: http://htmlpurifier.org/svnroot/html_purifier/trunk@44 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -21,7 +21,7 @@ class HTML_Generator
|
||||
|
||||
} elseif (is_a($token, 'MF_EmptyTag')) {
|
||||
$attr = $this->generateAttributes($token->attributes);
|
||||
return '<' . $token->name . ' ' . $attr . ' />';
|
||||
return '<' . $token->name . ($attr ? ' ' : '') . $attr . ' />';
|
||||
|
||||
} elseif (is_a($token, 'MF_Text')) {
|
||||
return htmlentities($token->data, ENT_COMPAT, 'UTF-8');
|
||||
|
Reference in New Issue
Block a user