Skip to content

Commit

Permalink
#1485638: use rawurlencode for all IE versions
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Dec 19, 2008
1 parent e275ce6 commit e943e1a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion program/steps/mail/get.inc
Expand Up @@ -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\"");
Expand Down

0 comments on commit e943e1a

Please sign in to comment.