diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-12-01 13:07:57 +0100 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2019-07-22 22:57:24 -0700 |
commit | d5fb1483cc3b05aff17804a57cd05e5882fc34ae (patch) | |
tree | 0ecc558a7f1c9df0a7d154e257cdbe063076fd30 | |
parent | Add Privacy policy link to bugzilla Footer. (diff) | |
download | bugzilla-gentoo-5.0.4.9.tar.gz bugzilla-gentoo-5.0.4.9.tar.bz2 bugzilla-gentoo-5.0.4.9.zip |
attachment: Force utf-8 if no charset is explicitly specifiedgentoo-5.0.4.9
Signed-off-by: Michał Górny <mgorny@gentoo.org>
(cherry picked from commit 5b3ece55946468a5571fd4c7309480aac267a6a9)
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-x | attachment.cgi | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/attachment.cgi b/attachment.cgi index 2f04e9594..3f0ff22ba 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -355,13 +355,7 @@ sub view { if ($contenttype !~ /\bcharset=/i) { # In order to prevent Apache from adding a charset, we have to send a # charset that's a single space. - $cgi->charset(' '); - if (Bugzilla->feature('detect_charset') && $contenttype =~ /^text\//) { - my $encoding = detect_encoding($attachment->data); - if ($encoding) { - $cgi->charset(find_encoding($encoding)->mime_name); - } - } + $cgi->charset('UTF-8'); } print $cgi->header(-type=>"$contenttype; name=\"$filename\"", -content_disposition=> "$disposition; filename=\"$filename\"", |