W3C home > Mailing lists > Public > public-html@w3.org > June 2009

Re: Reparsing of comments, escaped text spans, and --!>

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 4 Jun 2009 23:42:55 +0000 (UTC)
To: Simon Pieters <simonp@opera.com>, James Graham <jgraham@opera.com>
Cc: "public-html@w3.org" <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0906042339060.1648@hixie.dreamhostps.com>
On Fri, 24 Apr 2009, Simon Pieters wrote:
> On Fri, 23 May 2008 05:49:19 +0200, Ian Hickson <ian@hixie.ch> wrote:
> > > 
> > > Philip` found 128 pages with open "<!--" out of ~130K pages, listed 
> > > in http://philip.html5.org/data/pages-with-unclosed-comments.txt . I 
> > > looked through the first 82 pages.
> > > 
> > > Also found during this research was that a lot of pages use --!> and 
> > > expect it to close the comment. --!> closes comments in WebKit and 
> > > Gecko. We'll probably make --!> close comments given this data.
> > 
> > IE doesn't close on --!>, so I haven't changed this.
> 
> But IE reparses, so the pages mostly work in IE thanks to the reparse.
> 
> We are still finding pages that break because they expect --!> to close 
> the comment. Please change HTML5 here to make more Web pages work.

Done.


On Wed, 29 Apr 2009, James Graham wrote:
>
> I agree. I looked at some pages that currently trigger reparsing in IE 
> (the list of urls was compiled by Philip and is available at [2]). 
> Assuming my analysis was correct, 129 of (the unscripted, live versions 
> of) those pages have an unterminated comment in the current parsing 
> algorithm, of which 20 are fixed by making --!> end comments (matches 
> Gecko, Webkit, IE, Opera quirks) and 23 are fixed by making --\s*> 
> terminate comments (matches Gecko, IE, Opera quirks). I think HTML 5 
> should make both of those cases work to prevent significant 
> compatibility regressions.
> 
> [1] http://philip.html5.org/data/dotbot-20090424.txt
> [2] http://philip.html5.org/data/comments-not-closed-but-with-a-gt-after-them.txt

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/133
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/134

It appears --\s*> does not terminate comments in Webkit or Gecko, so I 
have not added that one.


On Thu, 7 May 2009, Simon Pieters wrote:
> 
> However the dashes in -- > and --!> can not overlap the dashes in <!--. 
> Also, --!> and -- > do not end escaped text spans.

I believe the spec is consistent with this.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 4 June 2009 23:43:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:38 GMT