|
From: <jgr...@us...> - 2003-05-09 00:33:45
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv29594/Classifier
Modified Files:
MailParse.pm
Log Message:
Fix bug where header encoding was not working properly; turn off coloring of pseudowords in the body of email
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.125
retrieving revision 1.126
diff -C2 -d -r1.125 -r1.126
*** MailParse.pm 6 May 2003 17:05:45 -0000 1.125
--- MailParse.pm 9 May 2003 00:33:42 -0000 1.126
***************
*** 160,170 ****
if ( $self->{color__} ) {
! $literal =~ s/</</g;
! $literal =~ s/>/>/g;
! my $color = $self->{bayes__}->get_color($mword);
! my $to = "<b><font color=\"$color\"><a title=\"$mword\">$literal</a></font></b>";
! if ( $encoded == 0 ) {
! $self->{ut__} =~ s/\Q$literal\E/$to/g;
! } else {
$self->{ut__} .= $to . ' ';
}
--- 160,168 ----
if ( $self->{color__} ) {
! if ( $encoded == 1 ) {
! $literal =~ s/</</g;
! $literal =~ s/>/>/g;
! my $color = $self->{bayes__}->get_color($mword);
! my $to = "<b><font color=\"$color\"><a title=\"$mword\">$literal</a></font></b>";
$self->{ut__} .= $to . ' ';
}
***************
*** 1173,1184 ****
my ($self, $header, $argument, $mime, $encoding) = @_;
! print "Header ($header) ($argument)\n" if ($self->{debug});
! if ($self->{color__}) {
! # Remove over-reading
! $self->{ut__} = '';
! # Qeueue just this header for colorization
! $self->{ut__} = splitline("$header: $argument\015\012", $encoding);
}
--- 1171,1181 ----
my ($self, $header, $argument, $mime, $encoding) = @_;
! print "Header ($header) ($argument)\n";# if ($self->{debug});
! if ( $self->{color__} ) {
! my $color = $self->{bayes__}->get_color( "header:$header" );
! $self->{ut__} = "<b><font color=\"$color\">$header</font></b>: $argument\015\012";
! print $self->{ut__};
}
|