]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/htmltidy.pm
* Don't run tidy with -xml as that fails if the input is not well-formed.
[ikiwiki.git] / IkiWiki / Plugin / htmltidy.pm
index fa08e4ef5d29f218018fa9da172a1fe2f5b1eb5a..6c1fba98e1b98e913ead06258a74ac21050d34de 100644 (file)
@@ -13,11 +13,11 @@ use IkiWiki;
 use IPC::Open2;
 
 sub import { #{{{
-       IkiWiki::hook(type => "sanitize", id => "tidy", call => \&sanitize);
+       IkiWiki::hook(type => "format", id => "tidy", call => \&format);
 } # }}}
 
-sub sanitize ($) { #{{{
-       open2(*IN, *OUT, 'tidy -quiet -xml -indent -utf8') or return shift;
+sub format ($) { #{{{
+       open2(*IN, *OUT, 'tidy -quiet -asxhtml -indent -utf8 --show-warnings no') or return shift;
        # open2 doesn't respect "use open ':utf8'"
        binmode (IN, ':utf8'); 
        binmode (OUT, ':utf8');