8/10/2004 ↓

Validate XHTML before you post

Thanks for visiting! We would like to serve you better. Please subscribe to our RSS feed for daily updates. This blog posts regular Wordpress news, updates of themes, plugins, ideas, hacks, quick fixes and everything about blogging, especially about Wordpress. You can also receive updates from this blog via email if you want that method of notification.

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.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Friends

Translate

Translate to German Translate to Spanish Translate to French Translate to Italian Translate to Portuguese Translate to Japanese Translate to Korean Translate to Russian Translate to Chinese

Latest Videos

10 Comments | Leave a comment | Comments RSS

  1. Is this for WP 1.2, or will it work with one or more of the 1.3 Alphas currently floating around?

    [Reply] Craig (19 comments.) — 08/10/2004 @ 4:48 pm
  2. Looks like not much has changed in the 1.2 Quicktags structure. This should work in the latest 1.3 as well.

    [Reply] Mark — 08/10/2004 @ 5:05 pm
  3. 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.

    [Reply] Jax (1 comments.) — 08/12/2004 @ 3:13 am
  4. [...] d valid. Not any more, first off we have LaughingLizard’s spankin’ new hack tovalidate your posts before publishing. Alright, so that is a [...]

    wordlog.com » Stay Valid — 08/12/2004 @ 5:19 am
  5. How come it’s validating in utf-8 when I use iso-8859-1?

    [Reply] David Blangstrup (2 comments.) — 08/24/2004 @ 4:28 am
  6. Its part of the validate code. Look for the s=’ variable and replace with 8859-1 DTD

    [Reply] Mark (34 comments.) — 08/24/2004 @ 8:10 am
  7. Sorry, I can’t find it in the quicktags.js — where should I go look for it?

    [Reply] David Blangstrup (2 comments.) — 08/24/2004 @ 4:07 pm
  8. Work perfectly. Thank You

    [Reply] PlanetPhillip (1 comments.) — 08/27/2004 @ 5:49 am
  9. 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.

    [Reply] yoli (1 comments.) — 04/19/2005 @ 5:07 pm
  10. 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.

    [Reply] BillyG (6 comments.) — 06/3/2006 @ 8:22 pm

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required, will not be published)


S2