Forums / Developer / How to minify html / Comment65712
Marko Žmak
Wednesday 09 February 2011 1:42:12 am
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.
Yes, you're right. And now that think about it, what about <pre> tags. We don't want to strip whitespaces and newlines from there...
Maybe eztidy is the way to go but as I already said in my experience I didn't find it to be a bulletproof solution. First of all you have to be alert when you add new non standard tags (fb: tags, og: tags...) and add them to the new tags in eztidy.ini. And second I had experiences when event this wasn't working. From time to time the non standard tags would just disappear from the markup, and I had to clear the eZ cache in order to get them back. I didn't have time to inspect it futher so I just turned off eztidy.
-- Nothing is impossible. Not if you can imagine it! Hubert Farnsworth