- From: Simon Pieters <zcorpan@hotmail.com>
- Date: Sun, 18 Jun 2006 18:38:36 +0000
Hi, The spec asks whether quirks mode parsing should be adopted[1]. I think it would be good if parsing worked more or less the same in quirks and standards mode. If we want to adopt quirks mode parsing, then here are some remarks: >Comment parsing is different. I think the current parsing algorithm for comments should remain. I don't think we should adopt IE's "overlapping" comments (<!--> being one comment), because that isn't logical and isn't how they work in XML and comments in other languages (such as /*/ in CSS isn't one comment). >The following is considered one script block (!): > > <script><!-- document.write('</script>'); --></script> This one is common, I think, and applies to IE6, Safari and Opera even in Standards Mode. Script parsing seems to work like this in Mozilla in Quirks Mode: 1. If the parser hits the string "<!--" then set a flag to ignore </script> tags. 2. If the parser then hits the string "-->" then reset the flag. 3. The flag can only be set once. 4. If the parser hits EOF, then reset the flag (if it is set) and reparse the script. Opera seems to do the same as Mozilla. I've tried to figure out exactly what IE does, but I have failed. It seems to do reparsing sometimes, and others not, and --> after the </script> tag makes a difference, and also whether there are characters after the --> (before EOF). The flag can also be set more than once. Safari seems to do pretty much what IE does. We would have to drop reparsing though. ></br> and </p> do magical things. I guess those magical things are that </br> is treated as <br>, and that </p> is treated as <p></p>? If so, then that seems more or less harmless. >p can contain table I think this might be a good thing. I would also like p to be able to contain other struct-inline elements, but perhaps that isn't really possible. >Safari and IE have special parsing rules for <% ... %> (even in standards >mode, though clearly this should be quirks-only). This wouldn't be a bogus comment, as bogus comments end with > (while these end with %>), but I think it would be possible to add this if we want to be more compatible with IE. What do others think? Do we want to be more compatible with quirks mode parsing? [1] http://whatwg.org/specs/web-apps/current-work/#the-initial1 Regards, Simon Pieters
Received on Sunday, 18 June 2006 11:38:36 UTC