- From: Ian Hickson <ian@hixie.ch>
- Date: Thu, 14 Jun 2007 01:17:16 +0000 (UTC)
On Wed, 19 Jul 2006, Simon Pieters wrote: > 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)[1]. > > 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.) I've made the spec do what IE does (not counting conditional comments). I haven't looked at the parsing of comments in PCDATA mode yet but I'm guessing we'll have to support <!--> there too. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 13 June 2007 18:17:16 UTC