voku/HtmlMin

Self-closing tag "hr" is creating closing tag when minifying

marcortola opened this issue · 1 comments

Self-closing tag "hr" is creating closing tag when minifying the HTML code. It seems to happen when executing this function:

$html = $dom->fixHtmlOutput(
$this->domNodeToString($dom->getDocument()),
$decodeUtf8Specials
);

This makes the minifier to produce bad HTML markup that does not pass the W3C validation throwing this error: Stray end tag “hr”.

How can I reproduce it?

Try to minify <hr> or <hr/>

voku commented

thanks for the bug-report ... fixed in version 3.0.2