Bug 30140 - XHTML parser more zealous than IE6
Summary: XHTML parser more zealous than IE6
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.6
: P2 Normal
Assignee: Nobody
URL: http://www.andreaskrog.dk/2009/09/er-...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-06 13:29 PDT by Morten Norby Larsen
Modified: 2009-10-06 13:56 PDT (History)
0 users

See Also:


Attachments
(X)HTML code for the page in question (23.61 KB, application/octet-stream)
2009-10-06 13:31 PDT, Morten Norby Larsen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Morten Norby Larsen 2009-10-06 13:29:49 PDT
Some pages, for instance the one in the URL, do not parse correctly as XHTML, and the browser shows an error message.

The page code is attached, in case it is changed.

The same page renders fine in IE6 (IE7 and IE8 not tested)

It may be of relevance that the Content-Type header is set to "application/octet-stream".
Comment 1 Morten Norby Larsen 2009-10-06 13:31:15 PDT
Created attachment 40740 [details]
(X)HTML code for the page in question
Comment 2 Mark Rowe (bdash) 2009-10-06 13:56:33 PDT
Internet Explorer does not support XHTML, so its content type sniffing causes it to treat the page as HTML.  Firefox and Chrome see the MIME type as application/octet-stream and decide to start a download instead.  In Safari CFNetwork’s content type sniffing determines that the page declares itself as being XHTML so WebKit attempts to parse it as such, but the page isn’t valid XHTML.  This is what results in the error being displayed.

No matter which way you look at it this page is just broken.  If it wants to be parsed as HTML it should be served with the text/html MIME type.  If it wants to be parsed as XHTML it should be valid XHTML.