Changeset 10839


Ignore:
Timestamp:
2005-11-04T13:20:21+13:00 (18 years ago)
Author:
jrm21
Message:

better match when looking at sub-part types so we don't match content-type
lines further down in the part (eg in a multipart/mixed part)

File:
1 edited

Legend:

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

    r10834 r10839  
    544544        my $part_text="";
    545545        foreach my $message_part (@message_parts) {
    546         if ($message_part =~ m@\s*content\-type:\s*text/html@mis)
     546        if ($message_part =~ m@^content\-type:\s*text/html@i)
    547547        {
    548548            # Use the HTML version
     
    554554        if ($part_text eq "") { # try getting a text part instead
    555555        foreach my $message_part (@message_parts) {
    556             if ($message_part =~ m@^content\-type:\s*text/plain@mis)
     556            if ($message_part =~ m@^content\-type:\s*text/plain@i)
    557557            {
    558558            # Use the plain version
    559             $part_text= $self->text_from_part($message_part);
     559            $part_text = $self->text_from_part($message_part);
    560560            if ($part_text =~/[^\s]/) {
    561561                $part_text = text_into_html($part_text);
Note: See TracChangeset for help on using the changeset viewer.