Some people (e.g. #10486) seem to think it's a bright idea to use
"Content-Type: text". Although that's not valid, pretend it's text/plain
anyway since it's unlikely they managed to construct anything particularly
exciting.
$$this .= "\n";
}
- unless (($top and $type =~ m[^text/plain(?:;|$)]) or
+ unless (($top and $type =~ m[^text(?:/plain)?(?:;|$)]) or
($type =~ m[^multipart/])) {
push @$attachments, $entity;
my @dlargs = ($ref, "msg=$xmessage", "att=$#$attachments");
}
return if $disposition eq 'attachment' and not defined($att);
- return unless ($type =~ m[^text/] and $type !~ m[^text/html(?:;|$)]) or
+ return unless ($type =~ m[^text/?] and $type !~ m[^text/html(?:;|$)]) or
$type =~ m[^application/pgp(?:;|$)] or
$entity->is_multipart;