Forums / Developer / How to minify html / Comment65702

Author Topic

Jerome Despatis

Wednesday 09 February 2011 12:58:58 am

Comment65702

Marko, simple code to remove \n should work, but Murphy is all around on doing regexp... Imagine a js string that contains \n, it would be simply dropped by this code and change the behavior of the application.

Tidy should take care of this I guess.

I've tested the HTML.php function but it leaves some \n.

In fact in the code, the developper has done this logic, as said in a comment:

<span class="pln">use newlines before </span><span class="lit">1st</span><span class="pln"> attribute in open tags </span><span class="pun">(</span><span class="pln">to limit line lengths</span><span class="pun">)</span><span class="pln">
</span>