[wp-trac] Re: [WordPress Trac] #3406: Use HTML4 instead of XHTML1
WordPress Trac
wp-trac at lists.automattic.com
Thu Nov 30 00:10:20 GMT 2006
#3406: Use HTML4 instead of XHTML1
-----------------------+----------------------------------------------------
Reporter: TedNelson | Owner: anonymous
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Template | Version:
Severity: normal | Resolution: wontfix
Keywords: |
-----------------------+----------------------------------------------------
Comment (by benjaminhawkeslewis):
Viper007Bond:
A couple points about this. First, XHTML conformance is not a matter of
mere validity and, second, I suspect Lachlan regards XHTML 1.0 served as
text/html as tag soup since it has no specified handling beyond browsers
copying each others’ error recovery (see RFC 2854).
I’m going to go out on a limb here and guess that
[http://www.viper007bond.com www.viper007bond.com] is one of your
WordPress sites? One of the things I’ve learned when dealing with tag
soup systems is to never judging a site’s validity by its homepage. And
sure enough, if we visit your
[http://www.viper007bond.com/archives/2006/11/19/casino-royale/"
penultimate post] we find it fails validation with two errors. If you were
serving that page as application/xhtml+xml, so that Firefox used its XHTML
parser rather than its tag soup parser, you’d see a yellow screen of death
instead of your page because your tags are mismatched.
It doesn’t reflect especially poorly on you that this happens (and I don’t
claim to be any paragon of marking up myself). It’s a natural consequence
of the fact that WordPress is not designed from the ground-up to emit
valid XHTML, but instead to belt out broken markup that mostly renders
okay thanks to browsers’ forgiving error handling.
JeremyVisser:
Most (if not all) WordPress blogs would break very visibly, just like
Viper007Bond’s, if they were served as application/xhtml+xml, forcing
browsers to use XML parsing rather than tag soup parsing. Indeed our
ability to serve XHTML as text/html at all depends on browsers being
“crappy” and “non-standards-compliant”, since if they had complied with
the HTML specification they would interpret minimized XHTML tags ending />
as really ending at the / and print the > as part of the text content, due
the SGML declaration for HTML 4.
--
Ticket URL: <http://trac.wordpress.org/ticket/3406#comment:12>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list