voku / HtmlMin

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

HtmlMin should not decode reserved characters entities (<, >) #22

Closed jsamr closed 5 years ago

jsamr commented 5 years ago

How can I reproduce it?

The issue happens with < and >.

<?php

use voku\helper\HtmlMin;

$minifier = new HtmlMin();
echo $minifier->minify('<span>&lt;</span>');
// prints:  <span><</span>
// expects: <span>&lt;</span>

However, a lonely entity is not decoded.

<?php

use voku\helper\HtmlMin;

$minifier = new HtmlMin();
echo $minifier->minify('&lt;');
// prints:  &lt;
// expects: &lt;

Does it take minutes, hours or days to fix?

I would say minutes.

Any additional information?

Voku version 3.0.4

voku commented 5 years ago

Thanks for the bug-report, fixed in version 3.0.5.

jsamr commented 5 years ago

@voku Thanks a lot, that was fast!