spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felic...@apache.org
Subject svn commit: rev 10188 - incubator/spamassassin/trunk/lib/Mail/SpamAssassin
Date Thu, 22 Apr 2004 20:48:36 GMT
Author: felicity
Date: Thu Apr 22 13:48:35 2004
New Revision: 10188

Modified:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
Log:
adding some comments for get_uri_list()

Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm	Thu Apr 22 13:48:35
2004
@@ -1465,6 +1465,15 @@
 # Finally, the address-spec regex (more or less)
 my $Addr_spec_re   = qr<$local_part\s*\@\s*$domain>o;
 
+# Returns an array of all URIs found in the message.  It takes
+# a combination of the URIs found in the rendered body and the
+# URIs found when parsing the HTML in the message.  The array will
+# include the "raw" URI as well as "slightly cooked" versions --
+# ie: 'http://%77%77%77.spamassassin.org/' will get turned into:
+# ( 'http://%77&#00119;%77.spamassassin.org/', 'http://www.spamassassin.org/' )
+# -- this lets us run rules against both the original and "correct"
+# versions easily.
+#
 # This really belongs in metadata
 sub get_uri_list {
   my ($self) = @_;
@@ -1479,6 +1488,8 @@
   # to do (note: we know the HTML parsing occurs, because we call for the
   # rendered text which does HTML parsing...)  trying to get URLs out of
   # HTML w/out parsing causes issues, so let's not do it.
+  # also, if we allow $textary to be passed in, we need to invalidate
+  # the cache first. fyi.
   my $textary = $self->get_decoded_stripped_body_text_array();
 
   my ($rulename, $pat, @uris);
@@ -1560,7 +1571,7 @@
     }
   }
 
-  # remove duplicates
+  # remove duplicates, merge nuris and uris
   my %uris = map { $_ => 1 } @uris, @nuris;
   @uris = keys %uris;
 

Mime
View raw message