Strip margin/heights in comments.
Patch by denise.
diffs (30 lines):
diff -r 70e2dbccee35 -r 5b84bd8fb073 cgi-bin/cleanhtml.pl
--- a/cgi-bin/cleanhtml.pl Sun Jul 05 10:24:51 2009 +0000
+++ b/cgi-bin/cleanhtml.pl Sun Jul 05 10:38:48 2009 +0000
@@ -145,6 +145,7 @@ sub clean
my $suspend_msg = $opts->{'suspend_msg'} || 0;
my $unsuspend_supportid = $opts->{'unsuspend_supportid'} || 0;
my $to_external_site = $opts->{to_external_site} || 0;
+ my $remove_positioning = $opts->{'remove_positioning'} || 0;
my @canonical_urls; # extracted links
my %action = ();
@@ -647,6 +648,10 @@ sub clean
if ($remove_fonts) {
$hash->{style} =~ s/font-family:.*?(?:;|$)//gi;
}
+ if ($remove_positioning) {
+ $hash->{style} =~ s/margin.*?(?:;|$)//gi;
+ $hash->{style} =~ s/height\s*?:.*?(?:;|$)//gi;
+ }
}
if ( $opts->{'clean_js_css'} &&
LJ::is_enabled('css_cleaner') ) {
@@ -1381,6 +1386,7 @@ sub clean_comment
'tablecheck' => 1,
'nocss' => $opts->{'nocss'},
'textonly' => $opts->{'textonly'} ? 1 : 0,
+ 'remove_positioning' => 1,
});
}
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog