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/09 06:01:47 UTC

svn commit: r376185 - /spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm

Author: felicity
Date: Wed Feb  8 21:01:45 2006
New Revision: 376185

URL: http://svn.apache.org/viewcvs?rev=376185&view=rev
Log:
bug 4695: treat <br/> the same as <br>

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

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm?rev=376185&r1=376184&r2=376185&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm Wed Feb  8 21:01:45 2006
@@ -106,17 +106,6 @@
 		],
 		marked_sections => 1);
 
-  # bug 4695: we want "<br/>" to be treated the same as "<br>".
-  # TODO: breaks uri.t lines 45, 46, 47.  very wierd, not good
-  # for now, just use the s/// workaround instead.
-
-  # if (!$self->can("empty_element_tags") || !eval {
-  # $self->empty_element_tags(1);
-  # }) {
-  # # can't use that API; fall back to fixing up in advance
-  # $self->{preclean_empty_elements} = 1;
-  # }
-
   $self;
 }
 
@@ -264,9 +253,7 @@
 
   # bug 4695: we want "<br/>" to be treated the same as "<br>", and
   # the HTML::Parser API won't do it for us
-  # if ($self->{preclean_empty_elements}) {
-  $text =~ s/<br\s*\/>/<br>/gis;
-  # }
+  $text =~ s/<([^>]+?)\s*\/>/<$1>/gi;
 
   # Ignore stupid warning that can't be suppressed: 'Parsing of
   # undecoded UTF-8 will give garbage when decoding entities at ..' (bug 4046)