summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Attachment.pm
diff options
context:
space:
mode:
authorKohei Yoshino <kohei.yoshino@gmail.com>2018-06-27 04:00:02 +0200
committerDylan William Hardison <dylan@hardison.net>2018-06-27 04:00:02 +0200
commitc46b694c342da3c1b4e2bb4394ff2886b9bd44f1 (patch)
tree0950c6e761c3854c04f15127ddb541821c0fc680 /Bugzilla/Attachment.pm
parent5191f5508b12d2e135374a0727e1ed82e8345604 (diff)
downloadbugzilla-c46b694c342da3c1b4e2bb4394ff2886b9bd44f1.tar.gz
bugzilla-c46b694c342da3c1b4e2bb4394ff2886b9bd44f1.tar.xz
Bug 1471417 - Remove XUL from attachment Content Type options; add SVG to standard options; mark PDF viewable
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r--Bugzilla/Attachment.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index 0bdb50c9a..9eac3a147 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -297,10 +297,8 @@ sub is_viewable {
# We assume we can view all text and image types.
return 1 if ($contenttype =~ /^(text|image)\//);
- # Mozilla can view XUL. Note the trailing slash on the Gecko detection to
- # avoid sending XUL to Safari.
- return 1 if (($contenttype =~ /^application\/vnd\.mozilla\./)
- && ($cgi->user_agent() =~ /Gecko\//));
+ # Modern browsers support PDF as well.
+ return 1 if ($contenttype eq 'application/pdf');
# If it's not one of the above types, we check the Accept: header for any
# types mentioned explicitly.