Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror

Comment Re:dear firefox: (Score 0) 188

Ugh.

You don't need to disable output escaping unless you want to allow poorly-formed HTML. If the input is well-formed XHTML, you can just recurse through the elements, outputting them with their attributes. You'll end up with the same output without the need to disable output escaping. Hey presto! That's what I always do. You can work around escaping issues if you're not lazy.

Mozilla are correct that supporting arbitrary HTML through disable-output-escaping would require an additional parse of the output mark-up. Badgering them into it is telling them to sacrifice performance for your laziness.

disable-output-escaping is for non-HTML/XML output solutions. Like, if you are trying to output plain text. You should not be trying to do that in a web browser.

Also, innerHTML is still read-only in Firefox in true XHTML situations. However, you can write an XHTML snippet to the DOM by generating an XHTML fragment using XSLT and appending it as a child (no silly recursive functions necessary). Much cleaner and more reliable. Do that instead!

Yes, IE only generates strings from XSLT in JavaScript, but you can always fall back to innerHTML in that situation, rather than using it all of the time.

Slashdot Top Deals

The IBM 2250 is impressive ... if you compare it with a system selling for a tenth its price. -- D. Cohen

Working...