spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quin...@apache.org
Subject svn commit: rev 55734 - in spamassassin/trunk: lib/Mail/SpamAssassin rules
Date Wed, 27 Oct 2004 20:59:22 GMT
Author: quinlan
Date: Wed Oct 27 13:59:21 2004
New Revision: 55734

Modified:
   spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
   spamassassin/trunk/rules/70_testing.cf
Log:
bug 3680: remove tests for empty anchors - very poor HTML ham results


Modified: spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm	(original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm	Wed Oct 27 13:59:21 2004
@@ -559,11 +559,6 @@
       $self->examine_text_style($1, $2);
     }
   }
-  # image inside of an anchor
-  # XXX - test code
-  if ($tag eq "img" && exists $self->{inside}{a} && $self->{inside}{a}
> 0) {
-    $self->{anchor}->[$self->{anchor_index}] .= " <img> ";
-  }
   if ($tag eq "img" && exists $attr->{width} && exists $attr->{height})
{
     my $width = 0;
     my $height = 0;
@@ -603,10 +598,6 @@
   if ($tag eq "a") {
     $self->{anchor_index}++;
     $self->{anchor}->[$self->{anchor_index}] = "";
-    # XXX - test code
-    if (!exists $attr->{href} || $attr->{href} !~ /\S/) {
-      $self->put_results(t_anchor_empty_href => 1);
-    }
   }
   if ($tag eq "title") {
     $self->{title_index}++;
@@ -689,6 +680,7 @@
 
   # text that is part of body and also stored separately
   if (exists $self->{inside}{a} && $self->{inside}{a} > 0) {
+    # this doesn't worry about nested anchors
     $self->{anchor}->[$self->{anchor_index}] .= $text;
   }
   if (exists $self->{inside}{title} && $self->{inside}{title} > 0) {

Modified: spamassassin/trunk/rules/70_testing.cf
==============================================================================
--- spamassassin/trunk/rules/70_testing.cf	(original)
+++ spamassassin/trunk/rules/70_testing.cf	Wed Oct 27 13:59:21 2004
@@ -191,10 +191,6 @@
 endif	# Mail::SpamAssassin::Plugin::URIDNSBL
 
 # bug 3680: empty anchor, some others
-body T_HTML_LINK_EMPTY_1	eval:html_text_match('anchor', '^$')
-body T_HTML_LINK_EMPTY_2	eval:html_text_match('anchor', '^\s*$')
 body T_HTML_LINK_PUSH_HERE	eval:html_text_match('anchor', '(?i)(?:push|go|cl[1l]ck)\s*(?:here|this)')
 body T_HTML_LINK_OPT		eval:html_text_match('anchor', '(?i)opt.?(?:out|in)')
 body T_HTML_LINK_OPT_OUT	eval:html_text_match('anchor', '(?i)opt.?out')
-body T_HTML_LINK_EMPTY_HREF  eval:html_test('t_anchor_empty_href')
-describe T_HTML_LINK_EMPTY_HREF  HTML anchor has empty or missing HREF value

Mime
View raw message