From ab94d342547caaf0335a54d843a5251ba23fedae Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Fri, 30 Mar 2012 15:31:11 +0800 Subject: Bug 738732: fix mangling of summary by securemail --- extensions/SecureMail/Extension.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'extensions') diff --git a/extensions/SecureMail/Extension.pm b/extensions/SecureMail/Extension.pm index c863c72ba..11a67d5fd 100644 --- a/extensions/SecureMail/Extension.pm +++ b/extensions/SecureMail/Extension.pm @@ -26,7 +26,7 @@ use base qw(Bugzilla::Extension); use Bugzilla::Group; use Bugzilla::Object; use Bugzilla::User; -use Bugzilla::Util qw(correct_urlbase trim trick_taint); +use Bugzilla::Util qw(correct_urlbase trim trick_taint is_7bit_clean); use Bugzilla::Error; use Bugzilla::Mailer; @@ -275,6 +275,9 @@ sub _make_secure { if ($key_type && $sanitise_subject) { # Subject gets placed in the body so it can still be read my $body = $email->body_str; + if (!is_7bit_clean($subject)) { + $email->encoding_set('quoted-printable'); + } $body = "Subject: $subject\015\012\015\012" . $body; $email->body_str_set($body); } -- cgit v1.2.3-24-g4f1b