[whatwg] About adopting quirks mode parsing
zcorpan at hotmail.com
Wed Jul 19 09:13:22 PDT 2006
From: Ian Hickson <ian at hixie.ch>
>On Mon, 17 Jul 2006, Simon Pieters wrote:
> > As for an algorithm for how to do that, I think that an extra flag would
> > be sufficient. If the parser hits <!-- while in RCDATA or CDATA, the
> > flag is set to true. Then, if the parser hits --> the flag sets to
> > false. Initially the flag is false. While the flag is true the element
> > can't be closed.
>It's slightly more complicated than that due to the whole problem with
>things like "<!--->", but yes.
You're right. I forgot about that. I've added more test cases (008-014, and
003-004 in rcdata).
Opera never treats <!--> as a standalone pseudo-comment.
Firefox treats <!--> as a standalone pseudo-comment for script, but not for
title and textarea.
IE always treats <!--> as a standalone pseudo-comment.
Safari treats <!--> as a standalone pseudo-comment for style and script, but
not for noscript, noembed and noframes.
Now, I think that <!--> should always be treated as a standalone
pseudo-comment if <!--> will be treated as a standalone real comment (in
PCDATA), otherwise never. (If pseudo-comments really are needed, that is.)
Speaking of PCDATA <!--> comments, it came to me that some pages (such as
 and ) might use <!--> in context of IE conditional comments, like so:
<!--[if !IE]> <--> ... <!--> <![endif]-->
...which doesn't actually rely on <!--> being parsed as one comment.
More information about the whatwg