voku / HtmlMin

:clamp: HtmlMin: HTML Compressor and Minifier via PHP
MIT License
161 stars 22 forks source link

incorrect processing with Attributes html #37

Closed storm1101 closed 5 years ago

storm1101 commented 5 years ago

What is this feature about (expected vs actual behaviour)?

How can I reproduce it?

Does it take minutes, hours or days to fix?

Any additional information?

storm1101 commented 5 years ago

This html code has an incorrect processing:

\<button type="button" id="rotate_crop" class="btn btn-primary" data-loading-text="\<i class='fa fa-spinner fa-spin'>\</i> Rotando..." style="">Rotar\</button>

$htmlMin = new HtmlMin();

echo $htmlMin->minify("\<button type=\"button\" id=\"rotate_crop\" class=\"btn btn-primary\" data-loading-text=\"\<i class='fa fa-spinner fa-spin'>\</i> Rotando...\" style=\"\">Rotar\</button>");

Bad Output is: button type="button" id="rotate_crop" class="btn btn-primary" data-loading-text=" Rotando..." style=""

voku commented 5 years ago

Hi, I added a test case here "https://github.com/voku/HtmlMin/commit/1b6d9cdeb25286dfae4720f9663df7a6978e18b6" but it passed and I can't see the issue? Maybe you are not using the current version of HtmlMin? https://github.com/voku/HtmlMin/blob/master/CHANGELOG.md

voku commented 5 years ago

Please feel free to re-open the issue if this is still a problem for you.