2010. 11. 29
Tidyhtml 0.01
Initial version
I’ve just written a tiny blosxom plugin that cleans up your html. It uses the 1.07_01 dev version of
HTML::Tidy, which in
turn uses libtidy.
Since this is the first ever version, I’m just going to paste it here. I’ll build a proper release later on.
# Blosxom Plugin: tidyhtml
# Author(s): Rhesa Rozendaal
# Version: 0.01
# URL: http://oss.rhesa.com/blog/text/blosxom/plugins/tidyhtml
package tidyhtml;
use strict;
# --- Configurable variables -----
my $tidy_config = {
tidy_mark => 'no',
wrap => '120',
indent => 'auto',
output_xhtml => 'yes',
char_encoding => 'utf8',
doctype => 'strict',
add_xml_decl => 'yes',
alt_text => 'photo',
};
# --------------------------------
use HTML::Tidy;
sub last {
# only operate on html content types.
return unless $blosxom::header->{-type} =~ /html/;
$blosxom::output = HTML::Tidy->new( $tidy_config )
->clean( $blosxom::output );
return;
}
sub start { 1 }
1;
No comments yet [ / text / blosxom / plugins / tidyhtml ] permalink
New version of “tidyhtml”
Slightly cleaned up, and made sure we’re outputting proper utf-8.
Grab tidyhtml 0.03 here and enjoy :-)
No comments yet [ / text / blosxom / plugins / tidyhtml ] permalink