"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Mail/SpamAssassin/HTML.pm" between
Mail-SpamAssassin-3.4.3.tar.bz2 and Mail-SpamAssassin-3.4.4.tar.bz2

About: SpamAssassin is a mail filter that uses a wide range of heuristic tests on mail headers and body text to identify "spam" (also known as unsolicited commercial email) incl. Bayesian (statistical) spam filter and several internet-based realtime blacklists.

HTML.pm  (Mail-SpamAssassin-3.4.3.tar.bz2):HTML.pm  (Mail-SpamAssassin-3.4.4.tar.bz2)
skipping to change at line 512 skipping to change at line 512
} }
elsif ($attr->{size} =~ /^\s*(\d+)/) { elsif ($attr->{size} =~ /^\s*(\d+)/) {
# absolute font size # absolute font size
$new{size} = $1; $new{size} = $1;
} }
} }
elsif ($name eq 'style') { elsif ($name eq 'style') {
$new{style} = $attr->{style}; $new{style} = $attr->{style};
my @parts = split(/;/, $new{style}); my @parts = split(/;/, $new{style});
foreach (@parts) { foreach (@parts) {
if (/^\s*(background-)?color:\s*(.+)\s*$/i) { if (/^\s*(background-)?color:\s*(.+?)\s*$/i) {
my $whcolor = $1 ? 'bgcolor' : 'fgcolor'; my $whcolor = $1 ? 'bgcolor' : 'fgcolor';
my $value = lc $2; my $value = lc $2;
if ($value =~ /rgb/) { if ($value =~ /rgb/) {
$value =~ tr/0-9,//cd; $value =~ tr/0-9,//cd;
my @rgb = split(/,/, $value); my @rgb = split(/,/, $value);
$new{$whcolor} = sprintf("#%02x%02x%02x", $new{$whcolor} = sprintf("#%02x%02x%02x",
map { !$_ ? 0 : $_ > 255 ? 255 : $_ } map { !$_ ? 0 : $_ > 255 ? 255 : $_ }
@rgb[0..2]); @rgb[0..2]);
} }
elsif ($value eq 'inherit') {
# do nothing, just prevent parsing of the valid
# CSS3 property value as 'invalid color' (Bug 7778)
}
else { else {
$new{$whcolor} = name_to_rgb($value); $new{$whcolor} = name_to_rgb($value);
} }
} }
elsif (/^\s*([a-z_-]+)\s*:\s*(\S.*?)\s*$/i) { elsif (/^\s*([a-z_-]+)\s*:\s*(\S.*?)\s*$/i) {
# "display: none", "visibility: hidden", etc. # "display: none", "visibility: hidden", etc.
$new{'style_'.$1} = $2; $new{'style_'.$1} = $2;
} }
} }
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)