diff --git a/store/src/java/com/zimbra/cs/service/formatter/NativeFormatter.java b/store/src/java/com/zimbra/cs/service/formatter/NativeFormatter.java index d2ed1ca7329..cb2c1e51d03 100644 --- a/store/src/java/com/zimbra/cs/service/formatter/NativeFormatter.java +++ b/store/src/java/com/zimbra/cs/service/formatter/NativeFormatter.java @@ -461,6 +461,7 @@ private static void sendbackOriginalDoc(InputStream is, String contentType, Stri } // defang when the html and svg attachment was requested with disposition inline if (disp.equals(Part.INLINE) && isScriptableContent(contentType)) { + contentType = Mime.getContentType(contentType).toLowerCase(); BrowserDefang defanger = DefangFactory.getDefanger(contentType); String content = defanger.defang(Mime.getTextReader(is, contentType, defaultCharset), true); resp.setContentType(contentType); @@ -616,10 +617,7 @@ public static void sendbackBinaryData(HttpServletRequest req, HttpServletRespons } PushbackInputStream pis = new PushbackInputStream(in, READ_AHEAD_BUFFER_SIZE); boolean isSafe = false; - HttpUtil.Browser browser = HttpUtil.guessBrowser(req); - if (browser != HttpUtil.Browser.IE) { - isSafe = true; - } else if (disposition.equals(Part.ATTACHMENT)) { + if (Part.ATTACHMENT.equals(disposition)) { isSafe = true; if (isScriptableContent(contentType)) { resp.addHeader("X-Download-Options", "noopen"); // ask it to save the file