-# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
+# Copyright (C) 2013-2015 all contributors <meta@public-inbox.org>
# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
#
# This only exposes one function: run
# start with the same defaults as mailman
our $BAD_EXT = qr/\.(exe|bat|cmd|com|pif|scr|vbs|cpl|zip)\s*\z/i;
-our $MIME_HTML = qr!\btext/html\b!i;
+our $MIME_HTML = qr!\btext/x?html\b!i;
our $MIME_TEXT_ANY = qr!\btext/[a-z0-9\+\._-]+\b!i;
# this is highly opinionated delivery
$mime->header_set('Content-Type', $part->content_type);
$mime->body_set($part->body_raw);
my $cte = $part->header('Content-Transfer-Encoding');
- if (defined($cte) && length($cte)) {
+ if (defined($cte) && $cte ne '') {
$mime->header_set('Content-Transfer-Encoding', $cte);
}
mark_changed($mime);