[Spambayes] [ spambayes-Bugs-696995 ] Invalid HTML comments are not ignored

SourceForge.net noreply at sourceforge.net
Mon Mar 3 18:09:17 EST 2003


Bugs item #696995, was opened at 2003-03-03 20:55
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=696995&group_id=61702

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Mark Hammond (mhammond)
Assigned to: Nobody/Anonymous (nobody)
Summary: Invalid HTML comments are not ignored

Initial Comment:
Incorrectly terminated HTML comments are ignored by
SpamBayes, but most clients handle this gracefully.

For both of the following:
hi <!-- comment > there
hi <!-- comment > more <!-- comment 2 --> there

IE and Mozilla both render "hi there".  SpamBayes will
miss the "there".  Thus, spambayes can miss most of the
message payload even though the user sees it all.

Attaching a patch which creates a new option,
ignore_unterminated_html_comments: True, which
correctly handles this case.  If set to False, you get
the old behaviour.  If no one can see a reason to keep
the existing behaviour, then this can be dropped as an
option.

----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2003-03-03 21:09

Message:
Logged In: YES 
user_id=31435

I suggest the one-line change to analyze() I posted to the 
mailing list instead -- there's no real value I can see in the 
current behavior of throwing away everything after an 
unmatched open-block construct, and it wasn't intentional 
behavior.  If an open-block construct isn't matched by a 
close-block construct, all in all it's more reasonable to act 
as if the open-block construct hadn't been recognized as 
one at all.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=696995&group_id=61702



More information about the Spambayes mailing list