Browse Source

decodeHeader() the message subject before building the filename

alex-brainstorm 21 years ago
parent
commit
75e1b864d9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/download.php

+ 2 - 1
src/download.php

@@ -96,7 +96,8 @@ if (is_object($message->header->disposition)) {
 //$filename = decodeHeader($filename, false, false);	//Don't want html output nor utf8 because it will return html output
 $filename = decodeHeader($filename, true, false);   //Don't want html output
 if (strlen($filename) < 1) {
-    $filename = $subject;
+    //$filename = decodeHeader($subject, false, false);	//Don't want html output nor utf8 because it will return html output
+    $filename = decodeHeader($subject, true, false);   //Don't want html output
     if ($type1 == 'plain' && $type0 == 'text')
         $suffix = 'txt';
     else if ($type1 == 'richtext' && $type0 == 'text')