summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-01-28 01:08:45 +0100
committermkanat%bugzilla.org <>2008-01-28 01:08:45 +0100
commitce3089f58a6edcb4074df97d1e6133d55b04377a (patch)
treeddd77aac7ee64b139d47fd829e7ec23163ebac5e /Bugzilla
parent3e29f04a94902958827585b02591094de67dd36a (diff)
downloadbugzilla-ce3089f58a6edcb4074df97d1e6133d55b04377a.tar.gz
bugzilla-ce3089f58a6edcb4074df97d1e6133d55b04377a.tar.xz
Bug 411544: Subject lines were still being improperly line-broken in emails.
Patch By Jeff Lawson <jlawson-mozilla@bovine.net> r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Mailer.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm
index 0040c855e..2702b8ff1 100644
--- a/Bugzilla/Mailer.pm
+++ b/Bugzilla/Mailer.pm
@@ -44,6 +44,7 @@ use Bugzilla::Util;
use Date::Format qw(time2str);
use Encode qw(encode);
+use Encode::MIME::Header;
use Email::Address;
use Email::MIME;
# Loading this gives us encoding_set.
@@ -78,9 +79,11 @@ sub MessageToMTA {
if (Bugzilla->params->{'utf8'} && !utf8::is_utf8($value)) {
utf8::decode($value);
}
+
+ # avoid excessive line wrapping done by Encode.
+ local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 998;
+
my $encoded = encode('MIME-Q', $value);
- # Encode adds unnecessary line breaks, with two spaces after each.
- $encoded =~ s/\n / /g;
$email->header_set($header, $encoded);
}
}