TidyText - Plugin for Moveable Type
A text-formatting plugin that uses HTML Tidy to make valid XHTML and HTML for blog entries in Moveable Type.
Moveable Type 2.6 or higher
HTML Tidy ( available at http://tidy.sourceforge.net/ )
Get and install HTML Tidy from http://tidy.sourceforge.net/ if you haven't already. If you don't know which version to get try Linux/x86 first.
Open tidytext.pl in a text editor and set $TIDY to the location of Tidy, $TIDYARGS to the arguments to give Tidy ( documented at http://tidy.sourceforge.net/docs/quickref.html ) and $TIDYTMP to the temp directory to use.
Put tidytext.pl in the plugins directory for your Moveable Type installation and make sure that the permissions make it readable by the web server
When you create or edit a blog entry you will have two new options under Text Formatting:
Or you can use TidyText in your template as a global filter or a container tag:
Uses temp files for processing, which is slow, but avoids deadlock issues that IPC::Open2 can have.
Hasn't been extensively tested, use at your own risk.
Convert Line Breaks uses Moveable Type to add <p> and <br /> tags. Because this is applied to the outside of multi-line container tags (i.e. <blockquote> or <ins>) Tidy sees the nesting error and closes the container tag at the first </p>. The solution is to turn off Convert Line Breaks and put <p> and </p> around your paragraphs for entries that use this tag.
This program is copyright 2004 George Hotelling (http://george.hotelling.net) and licensed under the GPL.