mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-03 04:37:39 +02:00
Fix bug in HTML_Generator that resulted in extra spaces. PureHTMLDefinition now passes all tests.
git-svn-id: http://htmlpurifier.org/svnroot/html_purifier/trunk@34 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -6,7 +6,7 @@ class HTML_Generator
|
||||
function generateFromToken($token) {
|
||||
if (is_a($token, 'MF_StartTag')) {
|
||||
$attr = $this->generateAttributes($token->attributes);
|
||||
return '<' . $token->name . ' ' . $attr . '>';
|
||||
return '<' . $token->name . ($attr ? ' ' : '') . $attr . '>';
|
||||
|
||||
} elseif (is_a($token, 'MF_EndTag')) {
|
||||
return '</' . $token->name . '>';
|
||||
|
Reference in New Issue
Block a user