|
From: <ssc...@us...> - 2003-07-18 05:25:27
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv4776
Modified Files:
Tag: b0/19/0
MailParse.pm
Log Message:
fix greedy regexp in decode_string
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.132.2.1
retrieving revision 1.132.2.2
diff -C2 -d -r1.132.2.1 -r1.132.2.2
*** MailParse.pm 15 Jul 2003 17:50:35 -0000 1.132.2.1
--- MailParse.pm 18 Jul 2003 05:25:24 -0000 1.132.2.2
***************
*** 44,48 ****
'ugrave' => 248, 'Ugrave' => 216, 'uml' => 168, 'Uuml' => 220,
'uuml' => 252, 'Yacute' => 220, 'yacute' => 252, 'yen' => 165,
! 'yuml' => 254);
#----------------------------------------------------------------------------
--- 44,48 ----
'ugrave' => 248, 'Ugrave' => 216, 'uml' => 168, 'Uuml' => 220,
'uuml' => 252, 'Yacute' => 220, 'yacute' => 252, 'yen' => 165,
! 'yuml' => 254);
#----------------------------------------------------------------------------
***************
*** 391,395 ****
# If we hit a table tag then any font information is lost
!
if ( $tag =~ /^(table|td|tr|th)$/i ) {
$self->{htmlfontcolor__} = map_color( $self, 'black' );
--- 391,395 ----
# If we hit a table tag then any font information is lost
!
if ( $tag =~ /^(table|td|tr|th)$/i ) {
$self->{htmlfontcolor__} = map_color( $self, 'black' );
***************
*** 1153,1165 ****
my $decode_it = '';
! while ( $mystring =~ /=\?[\w-]+\?(B|Q)\?(.*)\?=/ig ) {
if ($1 eq "B") {
$decode_it = decode_base64( $2 );
! $mystring =~ s/=\?[\w-]+\?B\?(.*)\?=/$decode_it/i;
} elsif ($1 eq "Q") {
$decode_it = $2;
$decode_it =~ s/\_/=20/g;
$decode_it = decode_qp( $decode_it );
! $mystring =~ s/=\?[\w-]+\?Q\?(.*)\?=/$decode_it/i;
}
}
--- 1153,1165 ----
my $decode_it = '';
! while ( $mystring =~ /=\?[\w-]+\?(B|Q)\?(.*?)\?=/ig ) {
if ($1 eq "B") {
$decode_it = decode_base64( $2 );
! $mystring =~ s/=\?[\w-]+\?B\?(.*?)\?=/$decode_it/i;
} elsif ($1 eq "Q") {
$decode_it = $2;
$decode_it =~ s/\_/=20/g;
$decode_it = decode_qp( $decode_it );
! $mystring =~ s/=\?[\w-]+\?Q\?(.*?)\?=/$decode_it/i;
}
}
|