[whatwg] About adopting quirks mode parsing

Ian Hickson ian at hixie.ch
Tue Jul 18 18:43:27 PDT 2006


On Mon, 17 Jul 2006, Simon Pieters wrote:
> > >
> > > 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).
> > 
> > I agree. However, in quirks mode this is a requirement. So if we make 
> > the parsing quirks-compatible (as in, if we remove DOCTYPE-switching 
> > for parsing), we have no choice.
> 
> Ok. I could live with that.

I'm not sure I could. :-)


> If we ignore reparsing, I think I know what Opera, Firefox, IE and Safari do.
> See these test cases:
> 
>   http://simon.html5.org/test/html/parsing/pseudo-comments/
> 
> I'm not sure what's most sensible to do. I think this is needed for at 
> least <script> parsing. My proposal is to allow multiple pseudo-comments 
> for all RCDATA and CDATA elements.

That could work... it's annoying and weird and non-SGML-compatible at all, 
but it could work... Let me do some more research on this.


> 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.


> [entities]

I'll look at that too, thanks for bringing that up to my attention.


> > > > 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.
> > 
> > Indeed.
> 
> It might be desirable also that a valid HTML4 document gets a conforming 
> HTML4 DOM. If it is, then <p>s shouldn't contain <table>.

I agree.


> > Like you, I don't know. :-) I want to do some research on this in due 
> > course, but I haven't been able to do it yet.
> 
> Would be interesting to see such a research. :-)

Working on it. I've added the things you brought up here to the list of 
things I need to look at.

Thanks,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list