From f7c50e28dbd637b3b60c6aea0fac3768f8f59f05 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Fri, 25 Jan 2013 11:57:09 -0500
Subject: [PATCH] Merge branch 'release-0.8' of github.com:roundcube/roundcubemail into release-0.8

---
 program/steps/mail/get.inc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index 924433d..2cc2f12 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -150,6 +150,13 @@
 
       $disposition = !empty($plugin['download']) ? 'attachment' : 'inline';
 
+      // Workaround for nasty IE bug (#1488844)
+      // If Content-Disposition header contains string "attachment" e.g. in filename
+      // IE handles data as attachment not inline
+      if ($disposition == 'inline' && $browser->ie && $browser->ver < 9) {
+        $filename = str_ireplace('attachment', 'attach', $filename);
+      }
+
       header("Content-Disposition: $disposition; filename=\"$filename\"");
 
       // do content filtering to avoid XSS through fake images

--
Gitblit v1.9.1