]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 387860 รข\80\93 Subject lines in mails may contain mangled multi-byte characters.
authorwurblzap%gmail.com <>
Fri, 10 Aug 2007 21:02:08 +0000 (21:02 +0000)
committerwurblzap%gmail.com <>
Fri, 10 Aug 2007 21:02:08 +0000 (21:02 +0000)
Patch by Ilya Slobodin <islobodin@yandex.ru>,
r=Wurblzap,wicked, a=LpSolit

Bugzilla/Mailer.pm

index ab54ecfea9ba9d9a55c0eb38dfbdb2b9b20b1d20..b4b2f320d959374d3ca63c79d62938bfd5280337 100644 (file)
@@ -66,6 +66,7 @@ sub MessageToMTA {
     # Encode the headers correctly in quoted-printable
     foreach my $header qw(From To Cc Reply-To Sender Errors-To Subject) {
         if (my $value = $email->header($header)) {
+            $value = Encode::decode("UTF-8", $value) if Bugzilla->params->{'utf8'};
             my $encoded = encode('MIME-Q', $value);
             $email->header_set($header, $encoded);
         }