Changeset 2732 for trunk/gsdl


Ignore:
Timestamp:
2001-09-04T16:43:57+12:00 (23 years ago)
Author:
jrm21
Message:

needed <pre> tags when using the text/plain part of a multipart message.

File:
1 edited

Legend:

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

    r2730 r2732  
    372372    if ($mimetype =~ /multipart/) {
    373373    $boundary="";
    374     if ($mimeinfo =~ /boundary=\"?([^"]+)\"?\s*$/im) {
     374    if ($mimeinfo =~ m@boundary=(\"[^\"]+\"|[^\s]+)\s*$@im) {
    375375        $boundary=$1;
     376        if ($boundary =~ m@^\"@) {
     377        $boundary =~ s@^\"@@; $boundary =~ s@\"$@@;
     378        }
     379    } else {
     380        print $outhandle "EMAILPlug: (warning) couldn't parse MIME boundary\n";
    376381    }
    377382    # parts start with "--$boundary"
     
    413418            # Use the plain version
    414419            $part_text=text_from_part($message_part);
     420            if ($part_text =~/[^\s]/) {
     421                $part_text="<pre>".$part_text."</pre>";
     422            }
    415423            $mimetype="text/plain";
    416424            last;
Note: See TracChangeset for help on using the changeset viewer.