voku / HtmlMin

:clamp: HtmlMin: HTML Compressor and Minifier via PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jsamr opened this issue · comments

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

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

@voku Thanks a lot, that was fast!