Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>So people often seem to say, yet I find very few portability/compatibility issues with running my web apps on any recent browser. I was surprised to find that in the last problem that did arise, it was actually IE that was compliant and Chrome and Firefox that were implementing non-standard behaviour.

Go on ... I've come across this once before several years ago but would be interested to know the details of this?



That particular case related to escaping characters that can be significant in HTML (quotes, ampersands, etc.). It turned out that IE honoured the named entities for exactly those characters specified in the HTML4 documentation when rendering an HTML4 document, while Firefox and Chrome also translated some additional named entities that were required by XHTML but not in HTML4. When it came to filling in form content from a database via AJAX, this led to a portability problem where you had to decide what to escape and what to put in verbatim.


>also translated some additional named entities that were required by XHTML but not in HTML4

Sounds like you were passing non-allowed entities into a doc interpreted as XML but as MSIE wouldn't do that it skipped over any issues by pretending it was HTML4?

That wouldn't be a standards compliance failure for FF/Chrome though. MSIE has often coped better with (forgive me) sloppy code, however.


Actually, the scenario was much simpler than that, to do with building dynamic HTML where form fields could contain characters like apostrophes.

It turns out that apos; is not a named entity in HTML4, but is rendered as the single character you might expect by both Firefox and Chrome. However, when we ran into IE not rendering it "properly", it turned out that we were wrong, and IE's behaviour was perfectly legal. (Whether it is standards-compliant to render a non-standard entity in this way, I don't know; the point was that it turned out not to be IE that wasn't compliant at all.)


I think I see now, you mean that as ' wasn't in the HTML4 spec despite the other browsers all rendering it consistently as an apostrophe MSIE not rendering it was not a breech of the standards.

So MSIE was compliant but just backward about it's approach to things that were beyond the standard. This presumably wouldn't ahve been an issue at all is MSIE supported XHTML ... but I digress, thanks for responding.

---

http://www.w3.org/TR/html4/sgml/entities.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: