Fri, 26 Mar 2010 15:08:07 -0700, /Phillip Pi/:

http://www.bellagio.com/ showed: "XML Parsing Error: not well-formed
Location: http://www.bellagio.com/
Line Number 9, Column 27:<script>document.write('<s'+'cript
language="JavaScript"
src="http://switch.atdmt.com/jaction/mgmmgm_BellagioHomepage_1";></s'+'cript>')</script>

--------------------------^"

IE8 had no problems. Thank you in advance. :)

First, they seem to incorrectly sniff on the 'User-Agent' header rather than the definitive 'Accept' header to determine what 'Content-Type' to specify. They specify 'text/html' for IE and 'application/xhtml+xml' for others. In all cases their content should be compatible whether served as 'text/html' or 'application/xhtml+xml'. Apart from the most obvious syntax incompatibility they have ignored, the usage of 'HTMLDocument.write()' in scripts will fail when served as 'application/xhtml+xml' [1].

For anyone interested, if you ever encounter site broken in this way, you could use the "Open in Browser" extension:

https://addons.mozilla.org/addon/8207

Whenever you get the yellow "XML Parsing Error" page, try View -> View as -> Web page, which will cause reinterpreting the page just if served as 'text/html'. You may try it even when the page initially loads o.k. but then some script doesn't work because of XHTML vs. HTML compatibility issues (like the one I've pointed previously).

[1] http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite

--
Stanimir
_______________________________________________
support-seamonkey mailing list
[email protected]
https://lists.mozilla.org/listinfo/support-seamonkey

Reply via email to