You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by kb...@apache.org on 2017/08/24 10:32:59 UTC

svn commit: r1806020 - /spamassassin/branches/3.4/lib/Mail/SpamAssassin/HTML.pm

Author: kb
Date: Thu Aug 24 10:32:59 2017
New Revision: 1806020

URL: http://svn.apache.org/viewvc?rev=1806020&view=rev
Log:
bug 7443: handle inline style attributes in table and anchor tags


Modified:
    spamassassin/branches/3.4/lib/Mail/SpamAssassin/HTML.pm

Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/HTML.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/HTML.pm?rev=1806020&r1=1806019&r2=1806020&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/HTML.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/HTML.pm Thu Aug 24 10:32:59 2017
@@ -55,7 +55,7 @@ my %tricks = map {; $_ => 1 }
 
 # elements that change text style
 my %elements_text_style = map {; $_ => 1 }
-  qw( body font table tr th td big small basefont marquee span p div ),
+  qw( body font table tr th td big small basefont marquee span p div a ),
 ;
 
 # elements that insert whitespace
@@ -80,13 +80,14 @@ $ok_attributes{basefont}{$_} = 1 for qw(
 $ok_attributes{body}{$_} = 1 for qw( text bgcolor link alink vlink background );
 $ok_attributes{font}{$_} = 1 for qw( color face size );
 $ok_attributes{marquee}{$_} = 1 for qw( bgcolor background );
-$ok_attributes{table}{$_} = 1 for qw( bgcolor );
-$ok_attributes{td}{$_} = 1 for qw( bgcolor );
-$ok_attributes{th}{$_} = 1 for qw( bgcolor );
-$ok_attributes{tr}{$_} = 1 for qw( bgcolor );
+$ok_attributes{table}{$_} = 1 for qw( bgcolor style );
+$ok_attributes{td}{$_} = 1 for qw( bgcolor style );
+$ok_attributes{th}{$_} = 1 for qw( bgcolor style );
+$ok_attributes{tr}{$_} = 1 for qw( bgcolor style );
 $ok_attributes{span}{$_} = 1 for qw( style );
 $ok_attributes{p}{$_} = 1 for qw( style );
 $ok_attributes{div}{$_} = 1 for qw( style );
+$ok_attributes{a}{$_} = 1 for qw( style );
 
 sub new {
   my ($class, $character_semantics_input, $character_semantics_output) = @_;