voku/HtmlMin

HTML closing tag into script text/template (escaping slash character)

hiryu85 opened this issue · 1 comments

Hi voku, thanks for this library ;-).

Have a question about minify, about HTML into my <script type="text/template">. The output return by compressor escaping the slash of my closing tag.

$htmlMin = new \voku\helper\HtmlMin();
$htmlMin->doOptimizeViaHtmlDomParser(true);
return $htmlMin->minify('
     <script id="comment-loader" type="text/x-handlebars-template">
         <nocompress>
             <i class="fas fa-spinner fa-pulse"></i> Loading ... 
          </nocompress>
     </script>
 ');

This code return (escaping with </i>)

<script id="comment-loader" type="text/x-handlebars-template">
    <i class="fas fa-spinner fa-pulse"><\/i>
     Loading ...
</script>

Shouldn't it return the closing tag without escaping the slash character? It is into a script[type=text/template].
And tag not seems work.

voku commented

Thanks for the bug report, 👍 fixed in version 4.4.1.