Convert nbsp to space and allow usual characters in attachment filename
authoralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 1 Sep 2003 01:14:09 +0000 (01:14 +0000)
committeralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 1 Sep 2003 01:14:09 +0000 (01:14 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5602 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/download.php

index 323c52172677e5cf8c2f9af6264a19dbebd8ec9d..6b6173aa747d639f7ef82a4f2826c9856b0fc126 100644 (file)
@@ -166,7 +166,8 @@ function DumpHeaders($type0, $type1, $filename, $force) {
         $filename = 
             $languages[$squirrelmail_language]['XTRA_CODE']('downloadfilename', $filename, $HTTP_USER_AGENT);
     } else {
-       $filename = ereg_replace('[^-a-zA-Z0-9\.]', '_', $filename);
+//     $filename = ereg_replace('[^-a-zA-Z0-9\.]', '_', $filename);
+       $filename = ereg_replace('[\\/:\*\?"<>\|;]', '_', str_replace('&nbsp;', ' ', $filename));
     }
 
     // A Pox on Microsoft and it's Office!