summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-12-19 07:20:50 +0000
committeralecpl <alec@alec.pl>2008-12-19 07:20:50 +0000
commite943e1a96131301aa6da0e3730d947490f447a76 (patch)
treec2e857e8767071f2a3ce0b3b7a7bbd33811fdc3b
parente275ce6e8dc98873a7a0f6cce98b09b120965f0f (diff)
#1485638: use rawurlencode for all IE versions
-rw-r--r--program/steps/mail/get.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index b77621b0f..a722fcdf8 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -89,7 +89,14 @@ else if ($pid = get_input_value('_part', RCUBE_INPUT_GET)) {
}
$filename = $part->filename ? $part->filename : ($MESSAGE->subject ? $MESSAGE->subject : 'roundcube') . '.'.$ctype_secondary;
- $filename = ($browser->ie && $browser->ver < 7) ? rawurlencode(abbreviate_string($filename, 55)) : addcslashes($filename, '"');
+
+ if ($browser->ie && $browser->ver < 7)
+ $filename = rawurlencode(abbreviate_string($filename, 55));
+ else if ($browser->ie)
+ $filename = rawurlencode($filename);
+ else
+ $filename = addcslashes($filename, '"');
+
$disposition = !empty($_GET['_download']) ? 'attachment' : 'inline';
header("Content-Disposition: $disposition; filename=\"$filename\"");