HtmlMin
HtmlMin copied to clipboard
Broken script template tags
What is this feature about (expected vs actual behaviour)?
The script below produces this:
____simple_html_dom__voku__html_special_script____ id="foo" type="text/html"> <tr><td colspan=5> <script id="bar" type="text/html"> foo
How can I reproduce it?
$html = '<script id="foo" type="text/html">
<tr>
<td colspan="5">
</td>
</tr>
</script>
<script id="bar" type="text/html">
foo
</script>';
$htmlMin = new \voku\helper\HtmlMin();
echo $htmlMin->minify($html);
Does it take minutes, hours or days to fix?
Hopefully minutes.
Can you try this, but for your type: https://github.com/voku/HtmlMin/issues/77#issuecomment-1160412418
No joy, this gives the same output:
$htmlMin = new \voku\helper\HtmlMin();
$htmlMin->overwriteSpecialScriptTags(['text/html']);
echo $htmlMin->minify($html);