Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

April 30, 2003

Objection Overruled!

My, but this blog has taken a techno-geeky tilt…

Anyway, Phil Ringnalda recently objected to serving XHTML as application/xhtml+xml. He wants to serve XHTML because he uses XML-parsing tools in his back-end. But what, Phil asks, if someone posts a comment which is ill-formed XML? Mozilla won’t render it when served as application/xhtml+xml. So he wants the “safety net” that serving up text/html provides.

Never mind that ill-formed XML will cause his back-end XML parser to barf just as surely as it will Mozilla. No, the real answer to the problem of invalid XHTML in comments is, to paraphrase Ronald Reagan,

Trust, but validate!

So, with the help of a patched version of Alexei Kosut’s MTValidate plugin, we make sure that comments posted to this blog are valid XHTML before they get posted.

This won’t stop a malicious poster from sneaking invalid markup onto this blog (there are steps I could take to deal with that, but let’s just say I’d rather not go there), but it should deal pretty well with inadvertent breakage.

Next objection?

Update: Squashed a small bug, where the Validator would send invalid output (!).

Posted by distler at April 30, 2003 9:52 PM

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/151

2 Comments & 2 Trackbacks

Re: Objection Overruled!

Ulp. You do up the ante a bit, don’t you? Bookmarked, for when I move to a box I control, since I doubt I can get the validator running on a shared host.

Posted by: Phil Ringnalda on May 5, 2003 11:19 PM | Permalink | Reply to this

Re: Objection Overruled!

Ulp. You do up the ante a bit, don’t you?

Just getting you back for this. :-)

Bookmarked, for when I move to a box I control, since I doubt I can get the validator running on a shared host.

The “Validator” is a single CGI script, written in Perl, that Alexei has kindly wrapped as an MT plugin.

You need a bunch of Perl modules (some of which you may have to add to your extlib directory) to run it – nothing new there. And you need a binary of the SGML parser, onsgmls. If you can compile the OpenSP package from source, or grab a precompiled binary from someplace, you should be in like Flynn.

It’s really quite doable, regardless of whether you run your own box.

Posted by: Jacques Distler on May 6, 2003 12:01 AM | Permalink | Reply to this
Read the post Validation sustained
Weblog: phil ringnalda dot com
Excerpt: The XHTML validator comes to visit, and looks like it's willing to stay around my comments and entries for a while.
Tracked: June 22, 2004 1:29 AM
Read the post Validating Comments
Weblog: Musings
Excerpt: Run comments through the W3C Validator before posting. The first in a series of "How-To" articles on MovableType.
Tracked: January 13, 2007 2:20 PM

Post a New Comment