RESOLVED INVALID 30140
XHTML parser more zealous than IE6
https://bugs.webkit.org/show_bug.cgi?id=30140
Summary XHTML parser more zealous than IE6
Morten Norby Larsen
Reported 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".
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
Morten Norby Larsen
Comment 1 2009-10-06 13:31:15 PDT
Created attachment 40740 [details] (X)HTML code for the page in question
Mark Rowe (bdash)
Comment 2 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.
Note You need to log in before you can comment on or make changes to this bug.