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

On Wed, 29 Apr 2009 13:22:54 +0200, James Graham <jgraham@opera.com> wrote:

> 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.
>>
>
> 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 [1]).  
> 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.

However the dashes in -- > and --!> can not overlap the dashes in <!--. Also, --!> and -- > do not end escaped text spans.

-- 
Simon Pieters
Opera Software

Received on Thursday, 7 May 2009 12:52:47 UTC