Commit ff0e97c4 authored by wurblzap%gmail.com's avatar wurblzap%gmail.com

Bug 387860 – Subject lines in mails may contain mangled multi-byte characters.

Patch by Ilya Slobodin <islobodin@yandex.ru>, r=Wurblzap, a=mkanat
parent af47f924
...@@ -66,6 +66,7 @@ sub MessageToMTA { ...@@ -66,6 +66,7 @@ sub MessageToMTA {
# Encode the headers correctly in quoted-printable # Encode the headers correctly in quoted-printable
foreach my $header qw(From To Cc Reply-To Sender Errors-To Subject) { foreach my $header qw(From To Cc Reply-To Sender Errors-To Subject) {
if (my $value = $email->header($header)) { if (my $value = $email->header($header)) {
$value = Encode::decode("UTF-8", $value) if Bugzilla->params->{'utf8'};
my $encoded = encode('MIME-Q', $value); my $encoded = encode('MIME-Q', $value);
$email->header_set($header, $encoded); $email->header_set($header, $encoded);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment