From 387adcdb489b1dee45b3b7076af37b60039b09ba Mon Sep 17 00:00:00 2001 From: alex-brainstorm Date: Mon, 15 Sep 2003 23:40:38 +0000 Subject: [PATCH] The real nbsp fix, which preserves & too. Spotted by sqm@mynta.org git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5723 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/download.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/download.php b/src/download.php index 6b6173aa..a021558a 100644 --- a/src/download.php +++ b/src/download.php @@ -92,7 +92,7 @@ if (is_object($message->header->disposition)) { $filename = $header->getParameter('name'); } -$filename = decodeHeader($filename); +$filename = decodeHeader($filename, true, false); //Don't want html output if (strlen($filename) < 1) { if ($type1 == 'plain' && $type0 == 'text') { $suffix = 'txt'; @@ -167,9 +167,9 @@ function DumpHeaders($type0, $type1, $filename, $force) { $languages[$squirrelmail_language]['XTRA_CODE']('downloadfilename', $filename, $HTTP_USER_AGENT); } else { // $filename = ereg_replace('[^-a-zA-Z0-9\.]', '_', $filename); - $filename = ereg_replace('[\\/:\*\?"<>\|;]', '_', str_replace(' ', ' ', $filename)); + $filename = ereg_replace('[\\/:\*\?"<>\|;]', '_', $filename); } - + // We don't need to care about " since they have been replaced by _ // A Pox on Microsoft and it's Office! if (!$force) { // Try to show in browser window -- 2.25.1