Is XHTML still harmful?

I am launching a project in which the client is instructed to use XHTML 1.0 Strict. Now I am wondering if the problems described in Submitting XHTML as text / html, which is considered malicious , remained, and whether I should try to convince the client that this (very strictly stated) requirement is counterproductive.

Does Internet Explorer now process application/xhtml+xml ?

+3
source share
3 answers

IE9 handles application/xhtml+xml , including the SVG inside it, one of the main reasons why you need to use this type of media. (Otherwise, it makes little sense to use it today, as you get a bunch of scripting changes and IE and 9 incompatibility in exchange for a relatively small if there was any performance increase at the moment.)

I disagree with Hixie that serving XHTML as text/html has ever been truly harmful. Using recommendations for compatibility with HTML, XHTML has not been a problem for any browsers since the creation of Netscape 4. Although it actually does nothing on the client side, it can be useful for your own page processing workflow if you work with XML processing tools. And XML syntax rules, being more strict but simpler than HTML, are a good idea for the author; this gives the validator the ability to pick up errors that are valid constructs in SGML / HTML, but which are almost certainly not what you had in mind. (On the other hand, since the validator will not apply HTML compatibility guidelines, there are several places where it can skip well-formed, but complex markup, most often self-closing <script> tags that break the entire page.)

In particular, to answer his questions: /> and related SGML problems are only a problem for tools that really believe that HTML is SGML, which in the past was not a browser. In the future, this is specifically permitted in non-XML HTML format.

Hiding scripts / style sheets from "obsolete (pre-HTML 3.2!) Browsers has not been a problem for a decade or so: I came up with a distorted comment that it (correctly) ridicules as funny, but it was just an exercise; I never intended use it except in some kind of strange hypothetical emergency .. This, of course, is not necessary for using the built-in scripts and style sheets in XHTML-as-HTML ... a direct hacker is enough if you need to include the characters < and & , and most often you don’t even need to.

Nobody wants to sniff for XHTML-as-HTML and treat it differently, so the whole section is controversial. "Sending XHTML 1.1 as text / html is no different," the W3C was changed (now everything is fine), and XHTML 2.0 is dead.

So yes, use XHTML 1.0 Strict or XHTML 1.1 or XHTML5 if you want. But until IE9 is your basic browser (and it will be not so long ago), you will have to stick with text/html .

+6
source

Internet Explorer 9 will process application documents / xhtml + xml through the soup tag parser.

Internet Explorer 8 and earlier will prompt the user to save the document or open it in another application.

Internet Explorer 6 and newer all have a significant market share (although this to some extent depends on your market).

Nothing significant has changed regarding browser support for real XHTML for many years.

There are still a lot more problems than it costs if you are not actually using XML parsers in your production chain (in which case, luck convinces them to output XHTML that conforms to HTML compatibility guidelines).

+2
source

It depends on what you mean by Internet Explorer.

For example, IE6 is still from something like 2001 (which hasn't changed), and no, it still doesn't handle it correctly.

+1
source

All Articles