Util.pm (Mail-SpamAssassin-3.4.3.tar.bz2) | : | Util.pm (Mail-SpamAssassin-3.4.4-rc1.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 1329 | skipping to change at line 1329 | |||
# sometimes we catch URLs on multiple lines | # sometimes we catch URLs on multiple lines | |||
$uri =~ s/\n//g; | $uri =~ s/\n//g; | |||
# URLs won't have leading/trailing whitespace | # URLs won't have leading/trailing whitespace | |||
$uri =~ s/^\s+//; | $uri =~ s/^\s+//; | |||
$uri =~ s/\s+$//; | $uri =~ s/\s+$//; | |||
# CRs just confuse things down below, so trash them now | # CRs just confuse things down below, so trash them now | |||
$uri =~ s/\r//g; | $uri =~ s/\r//g; | |||
# Skip some common non-http stuff like #abcdef, ?foobar, | ||||
# /image.gif (but not //foo.com which actually does http) | ||||
next if length($uri) <= 1 || $uri =~ m{^(?:[#?&]|/(?!/))}; | ||||
# Make a copy so we don't trash the original in the array | # Make a copy so we don't trash the original in the array | |||
my $nuri = $uri; | my $nuri = $uri; | |||
# Handle emails differently | # Handle emails differently | |||
if ($nuri =~ /^mailto:/i || $nuri =~ /^[^:]*\@/) { | if ($nuri =~ /^mailto:/i || $nuri =~ /^[^:]*\@/) { | |||
# Strip ?subject= parameters and obfuscations | # Strip ?subject= parameters and obfuscations | |||
# Outlook linkifies foo@bar%2Ecom&x.com to foo@bar.com !! | # Outlook linkifies foo@bar%2Ecom&x.com to foo@bar.com !! | |||
if ($nuri =~ /^([^\@]+\@[^?]+)\?/) { | if ($nuri =~ /^([^\@]+\@[^?]+)\?/) { | |||
push @nuris, $1; | push @nuris, $1; | |||
} | } | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 4 lines changed or added |