You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by qu...@apache.org on 2005/05/09 06:50:02 UTC

svn commit: r169232 - in /spamassassin/trunk/lib/Mail/SpamAssassin: EvalTests.pm HTML.pm

Author: quinlan
Date: Sun May  8 21:50:00 2005
New Revision: 169232

URL: http://svn.apache.org/viewcvs?rev=169232&view=rev
Log:
remove some rule test code that won't be promoted

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm?rev=169232&r1=169231&r2=169232&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm Sun May  8 21:50:00 2005
@@ -3120,23 +3120,6 @@
 
 ###########################################################################
 
-sub check_numeric_http {
-  my ($self) = @_;
-
-  my $IP_ADDRESS = IPV4_ADDRESS;
-  my $IP_PRIVATE = IP_PRIVATE;
-  for my $uri ($self->get_uri_list()) {
-    if ($uri =~ m{^https?://[^/?]*\b($IP_ADDRESS)\b}i &&
-	$1 !~ /$IP_PRIVATE/)
-    {
-      return 1;
-    }
-  }
-  return 0;
-}
-
-###########################################################################
-
 sub check_ratware_name_id {
   my ($self) = @_;
 

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm?rev=169232&r1=169231&r2=169232&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm Sun May  8 21:50:00 2005
@@ -62,7 +62,7 @@
 
 # elements that change text style
 my %elements_text_style = map {; $_ => 1 }
-  qw( body font table tr th td big small basefont marquee span img ),
+  qw( body font table tr th td big small basefont marquee span ),
 ;
 
 # elements that insert whitespace
@@ -91,7 +91,6 @@
 $ok_attributes{th}{$_} = 1 for qw( bgcolor );
 $ok_attributes{tr}{$_} = 1 for qw( bgcolor );
 $ok_attributes{span}{$_} = 1 for qw( style );
-$ok_attributes{img}{$_} = 1 for qw( style );
 
 sub new {
   my ($class) = @_;
@@ -534,10 +533,6 @@
 	      $new{$whcolor} = name_to_rgb($value);
 	    }
 	  }
-	  elsif (/\s*display:\s*none\b/i) {
-	    $new{display} = 'none';
-            $self->put_results(span_invisible => 1);
-          }
 	}
       }
       else {
@@ -553,21 +548,6 @@
 	  $new{$name} = $attr->{$name};
 	}
       }
-      # all styles, not part of the if/elsif series
-      # START test code
-      if ($name eq "style") {
-	my $style = $new{style} = $attr->{style};
-	my @parts = split(/;/, $style);
-	foreach (@parts) {
-	  if (/\s*display:\s*none\b/i) {
-	    $self->put_results(display_none => 1);
-	    if ($tag eq "img") {
-	      $self->put_results(img_display_none => 1);
-	    }
-	  }
-	}
-      }
-      # END test code
       if ($new{size} > $self->{max_size}) {
 	$self->{max_size} = $new{size};
       }
@@ -845,7 +825,6 @@
 
   if ($invisible_for_bayes) {
     $self->display_text($text, invisible => 1);
-    $self->put_results(invisible_text => 1);
   }
   else {
     $self->display_text($text);



Re: svn commit: r169232 - in /spamassassin/trunk/lib/Mail/SpamAssassin: EvalTests.pm HTML.pm

Posted by Theo Van Dinter <fe...@kluge.net>.
On Mon, May 09, 2005 at 11:36:01AM -0700, Dan Quinlan wrote:
> > -1, unless I'm missing something obvious, this modifies our
> > visible/invisible distinction.
> 
> No, it just removed the rule variables.  The visible/invisible stuff for
> spans is still there... note that display_text is still there:
>  
> >>    if ($invisible_for_bayes) {
> >>      $self->display_text($text, invisible =3D> 1);
> >> -    $self->put_results(invisible_text =3D> 1);
> >>    }

Ah, I was missing something obvious.  Ok, sorry.  Please ignore my last
email. :)

-- 
Randomly Generated Tagline:
"Your next question is 'How does this gate work?'  I don't know.  I
 don't have to know, I'm not an Electrical Engineer, I'm a Computer
 Scientist."                  - Prof. Hamel

Re: svn commit: r169232 - in /spamassassin/trunk/lib/Mail/SpamAssassin: EvalTests.pm HTML.pm

Posted by Daniel Quinlan <qu...@pathname.com>.
Theo Van Dinter <fe...@kluge.net> writes:

> -1, unless I'm missing something obvious, this modifies our
> visible/invisible distinction.

No, it just removed the rule variables.  The visible/invisible stuff for
spans is still there... note that display_text is still there:
 
>>    if ($invisible_for_bayes) {
>>      $self->display_text($text, invisible =3D> 1);
>> -    $self->put_results(invisible_text =3D> 1);
>>    }

Daniel

-- 
Daniel Quinlan
http://www.pathname.com/~quinlan/

Re: svn commit: r169232 - in /spamassassin/trunk/lib/Mail/SpamAssassin: EvalTests.pm HTML.pm

Posted by Theo Van Dinter <fe...@kluge.net>.
-1, unless I'm missing something obvious, this modifies our
visible/invisible distinction.

> @@ -534,10 +533,6 @@
>  	      $new{$whcolor} = name_to_rgb($value);
>  	    }
>  	  }
> -	  elsif (/\s*display:\s*none\b/i) {
> -	    $new{display} = 'none';
> -            $self->put_results(span_invisible => 1);
> -          }
>  	}
>        }
>        else {
> @@ -553,21 +548,6 @@
>  	  $new{$name} = $attr->{$name};
>  	}
>        }
> -      # all styles, not part of the if/elsif series
> -      # START test code
> -      if ($name eq "style") {
> -	my $style = $new{style} = $attr->{style};
> -	my @parts = split(/;/, $style);
> -	foreach (@parts) {
> -	  if (/\s*display:\s*none\b/i) {
> -	    $self->put_results(display_none => 1);
> -	    if ($tag eq "img") {
> -	      $self->put_results(img_display_none => 1);
> -	    }
> -	  }
> -	}
> -      }
> -      # END test code
>        if ($new{size} > $self->{max_size}) {
>  	$self->{max_size} = $new{size};
>        }
> @@ -845,7 +825,6 @@
>  
>    if ($invisible_for_bayes) {
>      $self->display_text($text, invisible => 1);
> -    $self->put_results(invisible_text => 1);
>    }
>    else {
>      $self->display_text($text);
> 

-- 
Randomly Generated Tagline:
The computer is to the information industry roughly what the
 central power station is to the electrical industry.
 		-- Peter Drucker