Changeset 2886
- Timestamp:
- 2001-12-04T16:02:17+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/EMAILPlug.pm
r2847 r2886 266 266 if ($value) { 267 267 # assume subject, etc headers have no special HTML meaning. 268 $value =~ s@&@&\;@g;269 $value =~ s/</</g; $value =~ s/>/>/g;270 268 $value = &text_into_html($value); 271 269 # escape [] so it isn't re-interpreted as metadata … … 295 293 $transfer_encoding=$1; 296 294 } 297 if ($mimetype ne "text/plain") { 295 if ($mimetype eq "text/html") { 296 $$textref= $self->text_from_part("$Headers\n$$textref"); 297 } elsif ($mimetype ne "text/plain") { 298 298 $$textref= $self->text_from_mime_message($mimetype,$mimeinfo,$$textref, 299 299 $outhandle); 300 300 } elsif ($transfer_encoding =~ /quoted\-printable/) { 301 301 $$textref=qp_decode($$textref); 302 $self->convert2unicode($charset, $textref); 302 303 } elsif ($transfer_encoding =~ /base64/) { 303 304 $$textref=base64_decode($$textref); 305 $self->convert2unicode($charset, $textref); 304 306 } else { 305 307 $self->convert2unicode($charset, $textref); 306 308 } 307 309 … … 309 311 # Add "All headers" metadata 310 312 $Headers = &text_into_html($Headers); 311 $Headers =~ s/&([lg])t\;/&\;$1t\;/g;312 313 313 314 $Headers = "No headers" unless ($Headers =~ /\w/); … … 567 568 # the RFC also mentions "parallel". 568 569 } 569 } # end of multipart 570 } # end of ($mimetype !~ multipart) 571 else { 572 # we don't do any processing of the content. 573 } 574 570 575 return $text; 571 576 } … … 637 642 # keep in any newline characters. 638 643 foreach my $line (@lines) { 639 if ($line =~ s/=\s*$//) {} 640 else {$line.="\n";} 644 if ($line !~ s/=\s*$//) {$line.="\n";} 641 645 642 646 if ($line =~ /=[0-9A-Fa-f]{2}/) { # it contains an escaped char
Note:
See TracChangeset
for help on using the changeset viewer.