voku / HtmlMin

:clamp: HtmlMin: HTML Compressor and Minifier via PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

marcortola opened this issue · 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/>

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