XHTML Validity
February 18th, 2007 by K. Liisi Linask
I had not bothered to check the validity of my WordPress site’s XHTML before today, so perhaps it wasn’t surprising that there were some errors present. I took some time to track down and fix the minor issues. Hopefully, I caught them all.
Most of the errors were caused by some overlapping lists and list items in my Administration sidebar. Everything was displaying as intended even being non-validated, so I hadn’t noticed the problem, earlier. At any rate, it should be fine now. The other error was caused by the uploading of images with the TextMate Blogging.tmbundle. The inserted image tag was missing the closing bracket slash. I fixed the posts with images already in existence and also updated my local blogging bundle copy to eliminate errors with any future uploads. Here’s an image of the fixed line with the added / highlighted with red in the upload_image method of blogging.rb as a test:
![]()
It should, and does validate now. I added a badge in the Admin section linking to the W3C validator. Let me know if any other pages on this site fail!
Swift Fish Net:
See that #{ENV['TM_XHTML']} in the image command? That’s an environment variable that lets people select whether or not they’re using XHTML. If you go into your preferences, advanced, shell variables and create a new variable called TM_XHTML and give it a value of ‘/’ (with no quotes), all of the self closing tags will then include the slash.
Allan has posted some reasons why he doesn’t fully support XHTML and why it can be dangerous if not used properly, which is why TM doesn’t have full support for it by default. Turn it on using this method and you won’t have to hack individual commands
.
Brett
Thanks for the info. I hadn’t noticed that variable as I was kind of focused on just the closing bracket.
Of course, the geocaching.com badge completely messes up the validity completely.