MovableBlog: Blockquote and XHTML
July 31, 2002
One of my weblogs doesn't validate to XHTML Transitional because of MT and the over-use of the <blockquote> tag in my weblog entries. But I think I know how to get around it. Here's the standard HTML that MT produces:
<p>
I am so great, I am so great. Everybody loves me, I am so<br />
great!
</p>
And so on. MT, if you have 'convert line breaks' on, inserts the starting <p> and ending </p>. But use blockquote in there, and you stick a wrench in the W3 XHTML validator machine. But the way I got around it was thus:
<p>
I am so great, I am so great. Everybody loves me, I am so<br />
great!
</p>
<blockquote>
The start <p> was created by MT, but the end </p> was typed in by me, as was the starting <p> after the </blockquote>.
</blockquote>
<p>
I am so great, I am so great. Everybody loves me, I am so<br />
great!
</p>
Again, the very first <p> and very last </p> are inserted by MT.
But we all know that trying to make your weblog validate to XHTML Transitional is a waste of time.
Uh, yeah.
Comments
So far, I don't think I've ever done something like that (putting parts of tags in entries so that either the CMS or the template would complete them) without having it come back to bite me. You end up importing them into another program that does things differently, or the tag gets deprecated, or something unimaginable happens, and you end up having to edit dozens or hundreds of entries. That's why I hacked Util.pm to not wrap blockquotes, lists, tables, etc. in paragraph tags without my having to do anything out of the ordinary in my entries.
Posted by: Phil Ringnalda | August 1, 2002 08:20 AM
"But we all know that trying to make your weblog validate to XHTML Transitional is a waste of time."
No, it's not a waste of time...
Posted by: pete | August 7, 2002 06:57 AM
I was being sarcastic.
Posted by: Richard | August 7, 2002 01:03 PM
Cool. Thanks for the tip. Didn't realize that blockquote wasn't supposed to be in use anymore. You even motivated me to get my main page up to strict compliance - it was surprisingly painless to do.
Posted by: eric | August 7, 2002 06:19 PM
As far as I can tell blockquotes are ok to use (check the DTDs http://www.w3.org/TR/xhtml1/#dtds).
The problem is how they are included in the page.
Posted by: nathan | January 7, 2003 08:59 AM
Yeah, in XHTML 1.0 Strict and up (as far as I can tell), there needs to be block tags (like <p>content</p>) inside the <blockquote> tags.
Posted by: Richard | January 7, 2003 10:38 AM
Some of my notes on bringing MovableType up to XHTML 1.1 conformance are in this Support Forum thread.
I actually found that it was good to go in stages: first achieve XHTML 1.0 Transitional, then 1.0 Strict and then finally XHTML 1.1.
There is a bunch of stuff to fix at each stage, but it's more manageable to break up the task. Only once did I have to edit one of MT's perl scripts.
Posted by: Jacques Distler | January 16, 2003 08:10 PM