Ignore:
Timestamp:
2001-07-11T15:00:50+12:00 (23 years ago)
Author:
jrm21
Message:

typo in regexp broke import... encoding type should have had [\s], not
[
s] (only broke base64 though, quoted-printable and 7bit/8bit were OK...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/EMAILPlug.pm

    r2630 r2638  
    8080    my $self = new BasPlug ("EMAILPlug", @_);
    8181    # make sure we don't run textcat (defaults to "auto");
    82     $self->{'input_encoding'}="ascii";
     82    $self->{'input_encoding'}="ascii"; # this might not be good enough...
    8383    return bless $self, $class;
    8484}
     
    474474    my $part_header=$text;
    475475    $part_header =~ s/\r?\n\r?\n(.*)$//s;
    476     $text=$1;
     476    $text=$1; if (!defined($text)) {$text="";}
    477477    $part_header =~ s/\r?\n[\t ]+/ /gs; #unfold
    478478    $part_header =~ /content\-type:\s*([\w\/]+)/is;
    479     my $type=$1;
     479    my $type=$1; if (!defined($type)) {$type="";}
    480480    my $encoding="";
    481     if ($part_header =~ /^content\-transfer\-encoding:\s*([^s]+)/mis) {
     481    if ($part_header =~ /^content\-transfer\-encoding:\s*([^\s]+)/mis) {
    482482    $encoding=$1; $encoding=~tr/A-Z/a-z/;
    483483    }
     
    545545# see rfc2045 for description, but basically, bits 7 and 8 are set to zero;
    546546# 4 bytes of encoded text become 3 bytes of binary - remove 2 highest bits
    547 # from each byte.
     547# from each encoded byte.
    548548
    549549
Note: See TracChangeset for help on using the changeset viewer.