[Bug 8268] XMLHttpRequest fails for documents with named entities due to doctype

http://www.w3.org/Bugs/Public/show_bug.cgi?id=8268


Henri Sivonen <hsivonen@iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsivonen@iki.fi




--- Comment #2 from Henri Sivonen <hsivonen@iki.fi>  2009-11-12 07:58:21 ---
(In reply to comment #0)
> It's very unlikely that we'll deploy HTML5 in the foreseeable future if it means our
> users have to rewrite all their scripts.

The XHTML 1.0 doctypes are conforming in HTML5 (even in text/html), so you
could use the XHTML 1.0 Strict or XHTML 1.0 Transitional doctype and still
validate stuff like <video> as HTML5.

> I'm pretty sure that XHR is used for
> screen-scraping beyond Wikipedia, too, so this will probably crop up elsewhere
> too.

Even though Mediawiki is hugely popular, there probably aren't too many code
bases around that both serve polyglotish content as text/html now and that have
an XML consumer ecosystem.

> Could
> some reasonably minimal, distinctive doctype be invented that would avoid the
> problem but not make the document look to humans and validators like it thinks
> it's some old version of XHTML?

No, since the list of doctypes that make &nbsp; work in already-shipped
browsers is what it is. If you want compat with already shipped browsers, you
have to use a doctype that is on the magic list in Gecko, WebKit and Opera.

OTOH, if you are OK with browsers changing, you could wait for XHR2 to add HTML
parsing to XHR.

> Also, is this a wider problem?  Are there any other tools besides browsers that
> might be magically allowing named entities for some doctypes only?

It's very likely that there are tools that only support a closed catalog and,
for security or performance reasons, refuse fetch arbitrary DTDs.

Considering that the XHTML 1.0 doctypes are already valid, I'm not convinced
that removing the advertisement of the shorter doctype is that right thing on
balance, since for your situation to occur, you must have mostly successfully
have served polyglotish content to begin with, and that's so hard that it's
unlikely that many other code bases have succeeded in it.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 12 November 2009 07:58:31 UTC