Following up on an old article form Jesse Ruderman I wanted to have a way from within WordPress to validate XHTML through the Quicktags buttons. I rewrote the “Bloggidate” set of hacks to work from within WordPress.
So this will let you validate the content of your post before you actually post it to the blog to ensure things do not ever break in terms of validation. Just type in the post and click on validate from the quicktags.
The installation is relatively simple and I have included functions for both XHTML 1.0 Transitional and XHTML 1.0 Strict.
You can download the instructions from here:
http://weblogtoolscollection.com/b2-img/validatexhtml.txt
PS: Tested and working in both FF and IE
Again, much of the code comes from Jesse Ruderman, so thanks go out to him.
Is this for WP 1.2, or will it work with one or more of the 1.3 Alphas currently floating around?
Looks like not much has changed in the 1.2 Quicktags structure. This should work in the latest 1.3 as well.
Is there any way of hooking this up to the comments form so that comments can be valid XHTML? I can make my site validate, but I don’t want to manually edit each comment so that it validates. A plugin to do that would be great.
How come it’s validating in utf-8 when I use iso-8859-1?
Its part of the validate code. Look for the s=’ variable and replace with 8859-1 DTD
Sorry, I can’t find it in the quicktags.js — where should I go look for it?
Work perfectly. Thank You
Will this work for v 1.5 as well? That would be very nice if it did! I was able to insert the first part of the Javascript without any problems but they’ve changed how the dictionary code is written and it’s not as you’ve noted in the .txt file. Since I don’t really know Javascript I’m afraid to the code.
I updated to WP2.0.3 yesterday and added this code again (I’ve been using it for several months with great success) but now the button doesn’t appear on my panel. Is anybody else having the same results? TIA.