Validable (MT)

December 2nd, 2002

Version 1.32 – A plugin for MovableType that helps you create a validable site (as in “My site has valid XHTML according to W3C”) even when your sloppy writting style and MT’s line break conversion conspire against you.

“Validable” is a plugin for Movable Type. If you don’t know about MT then you don’t need this.

Latest Version

Version 1.32 – March 30, 2003

Recent Changes

[1.32] Fixed some warnings from perl about $1 being better than \1

Installation

Download the ZIP File and extract it to your favorite directory.

Copy “validable.pl” inside the “plugins” directory in your MT installation path

Usage

This plugin adds a global filter that can be used from pretty much any tag.

For example: <$MTEntryBody validable=”1”$>...</$MTEntryBody$> <$MTEntryTitle validable=”1”$>...</$MTEntryTitle$> <$MTCommentBody validable=”1”$>...</$MTCommentBody$>

What it does

This plugin corrects many of the most common “invalid” constructs by applying the following changes: – Convert all tag names to lowercase – Convert all & in the text to & (unless they are &something;) – Convert all &, ” and ’ in tag attribute values to the corresponding entities – Use double quotes for all tag attribute values – Attributes without a value (i.e. DEFER or ISMAP) are assigned their own name as default value. – Close IMG, BR and HR tags using shorthand () – Adds an empty ALT attribute to images without an ALT. – Remove MT’s automatic

when they enclose a block element like BLOCKQUOTE, PRE, H{x} or even another P. – Remove MT’s automatic
just after those block elements

More…

Listing on the MT Plugins Directory.

23 Respuestas a “Validable (MT)”

  1. stars nackt dijo:
    More on my transition from static (X)HTML to PHP + RSS + XSLT. As usual, all of my templates and scripts are available for anyone to examine and use, Urlaub, La Palma auf La Palma Los Canarios wandern Fuencaliente for anyone to examine and use.
  2. stars nackt dijo:
    This is a wonderful plug-in, but I'm having a problem that seems to have been mentioned a couple of times previously here, without a solution. Every time I use the blockquote element, a 'p' tag immediately follows it and is never closed properly.
  3. stars nackt dijo:
    pauli super
  4. canard dijo:
    Nice plugin, i spare so many hours with it, thanks again guys !!
  5. Htmlguy dijo:
    Cool plugin !!! keep going men keep going !
  6. convention collective dijo:
    Very Good plugin !
  7. Toni Palma dijo:
    Les commentaires fonctionnent à nouveau. Le problème venait du plugin Validable que j'avais ajouté à MT Palma Palma Palma dans l'espoir d'avoir une correction automatique du code XHTML.
  8. Franco Fuencaliente dijo:
    More on my transition from static (X)HTML to PHP + RSS + XSLT. As usual, all of my templates and scripts are available for anyone to examine and use, Urlaub, La Palma auf La Palma Los Canarios wandern Fuencaliente for anyone to examine and use.
  9. eric dijo:
    great plugin! thank you!
  10. Rob dijo:
    This is a wonderful plug-in, but I'm having a problem that seems to have been mentioned a couple of times previously here, without a solution. Every time I use the blockquote element, a 'p' tag immediately follows it and is never closed properly. So, it may look like this:

    This is how it looks

    Hopefully that worked. Am I doing something wrong or does the plugin have a problem?
  11. Chris dijo:
    Call me blind, but I've never seen this plugin on the mt-plugins site, neither by category, nor alphabetically, yet you have a link to it's mt-plugins.org page. Hmmm...what am I missing?
  12. Giorgio dijo:
    maybe mt-plugins.org site has not been updated recently ;-) ?
  13. Jeroen dijo:
    I just ran into a small problem. When I specify the language in the XML namespace (), the validable plugin changes this tag into , which is not valid. Could you please correct this?
  14. Michi dijo:
    You have done an exceptional job in creating and designing this website. My Congratulations to you!!!
  15. Jeroen dijo:
    I want to make my comments fool-proof, and think that this plugin might help me. Does it also remove control-characters entered in comments?
  16. Dan Kohn dijo:
    First, fantastic plug-in! Thanks very much. Now, a feature request. I have a lot of posts where I wrap multiple paragraphs in a . The problem is that MT adds around the individual paragraphs, making the post invalid XHTML since can't be inside . The solution would be to identify this situation, and add a at the end of each paragraph before the . Then, a new would be necessary for the next paragraph after the . This would continue until the original is reached. Of course, I can do this by hand, but have grown deeply lazy after making use of validar! To see exactly what I need to fix, take a look at this failed XHTML validation: .
  17. Jack dijo:
    Best conceivable purpose for an MT plugin yet. Nice job, man.
  18. Jason dijo:
    Maybe I read it wrong, but I thought it was supposed to create a

    at the end of paragraphs that didn't have them?
  19. The One True b!X dijo:
    Strangely, I am occassionally ending up with random p tags within blockquote tags. It doesn't even appear to be consistent as to when this behavior appears.
  20. mini-d dijo:
    Sebas si tienes tiempo de editar el plug-in puedo enviarte algunos casos en los que el validable hace cambios cuando no debería de hacerlos... salutes!
  21. Sebastian dijo:
    Yes... that's exactly what it does
  22. The One True b!X dijo:
    Remove MT's automatic

    when they enclose a block element like BLOCKQUOTE, PRE, H{x} or even another P. Just to make sure I'm following: Currently, I have a kludged bit in the MT code itself which scraps automatic

    tags whenever I sed a

    tag in an entry body. The above part of this plugin does the same thing, yes? So I could resotre the MT code back to it's former original self, install this plugin, and get the same proper xhtml through the plugin, yes?
  23. new dijo:
    new Send an e-anonymous Mobile Title Microsoft@microsoft.com No. Mobile Email:xx@hotmail.mms.com pass:xx Will be broadcasting through the server hotmail.mms.com Service vip Microsoft hotmail.mms.com Arabs http://www.mms-6rb.tk/ Warning will be of any threatening letter Will be accessible to you through the information ip

Deja tu respuesta

If you can read this, you don't use a typical webbrowser that plays nice with CSS.
Please do not fill in anything here!