-sub sanitize ($) { #{{{
- open2(*IN, *OUT, 'tidy -quiet -asxhtml -indent -utf8 --show-body-only yes --show-warnings no --tidy-mark no') or return shift;
+sub sanitize (@) { #{{{
+ my %params=@_;
+
+ my $pid;
+ my $sigpipe=0;
+ $SIG{PIPE}=sub { $sigpipe=1 };
+ $pid=open2(*IN, *OUT, 'tidy -quiet -asxhtml -utf8 --show-body-only yes --show-warnings no --tidy-mark no');
+