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 2004/02/02 16:57:08 UTC
svn commit: rev 6433 - incubator/spamassassin/trunk/lib/Mail/SpamAssassin
Author: felicity
Date: Mon Feb 2 07:57:07 2004
New Revision: 6433
Modified:
incubator/spamassassin/trunk/lib/Mail/SpamAssassin/MsgContainer.pm
Log:
if the raw size is 0, there's nothing to render, so don't bother. (solves a div by 0 error too)
Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/MsgContainer.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/MsgContainer.pm (original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/MsgContainer.pm Mon Feb 2 07:57:07 2004
@@ -267,9 +267,9 @@
# render text/html always, or any other text part as text/html based
# on a heuristic which simulates a certain common mail client
- if ( $self->{'type'} =~ m@^text/html\b@i ||
+ if ( $raw > 0 && ($self->{'type'} =~ m@^text/html\b@i ||
($text =~ m/^(.{0,18}?<(?:$Mail::SpamAssassin::HTML::re_start)(?:\s.{0,18}?)?>)/ois &&
- _html_near_start($1)
+ _html_near_start($1))
)
) {
$self->{'rendered_type'} = 'text/html';