You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/02/23 19:35:57 UTC
svn commit: r380192 -
/spamassassin/branches/3.1/lib/Mail/SpamAssassin/HTML.pm
Author: felicity
Date: Thu Feb 23 10:35:52 2006
New Revision: 380192
URL: http://svn.apache.org/viewcvs?rev=380192&view=rev
Log:
bug 4695: deal with '<br />' and similar tags in html
Modified:
spamassassin/branches/3.1/lib/Mail/SpamAssassin/HTML.pm
Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/HTML.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/HTML.pm?rev=380192&r1=380191&r2=380192&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/HTML.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/HTML.pm Thu Feb 23 10:35:52 2006
@@ -269,6 +269,10 @@
# reason, so convert them to spaces. Confirmed in 3.31, at least.
$text =~ s/ / /g;
+ # bug 4695: we want "<br/>" to be treated the same as "<br>", and
+ # the HTML::Parser API won't do it for us
+ $text =~ s/<(\w+)\s*\/>/<$1>/gi;
+
# ALWAYS pack it into byte-representation, even if we're using 'use bytes',
# since the HTML::Parser object may use Unicode internally. (bug 1417,
# maybe). Also, ignore stupid warning that can't be suppressed: 'Parsing of