Re: Revamp HTML5 doctype sniffing?

On Sat, 04 Apr 2009 23:24:06 +0200, Daniel Schattenkirchner <crazy-daniel@gmx.de> wrote:

> Sorry for reviving this one more time.
>
> Ian Hickson wrote:
>> In conclusion, I do not believe changing the sniffing algorithm at this  
>> point would be wise.
>
> In Opera 9.5 HTML 4.0 Transitional and Frameset doctypes with system  
> identifier also triggers Almost Standards Mode.

This was a regression from Opera 9.0 due to a misanalyzed broken page using the following doctype:

<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN" "http://...

It triggered quirks mode in Opera 9.0 but standards mode in Gecko and WebKit because we used a substring match and they matched the whole thing. Note the single slash in there.

So we changed to make HTML 4.0 transitional doctypes trigger almost standards mode. This broke other pages that used the proper HTML 4.0 transitional doctype and required quirks mode to work correctly (in Opera/Gecko/WebKit, anyway).

Opera 10 uses HTML5 rules for doctype sniffing.

-- 
Simon Pieters
Opera Software

Received on Monday, 6 April 2009 14:43:55 UTC