ソースを参照

decodeHeader() the message subject before building the filename

alex-brainstorm 21 年 前
コミット
75e1b864d9
1 ファイル変更2 行追加1 行削除
  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, 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
 $filename = decodeHeader($filename, true, false);   //Don't want html output
 if (strlen($filename) < 1) {
 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')
     if ($type1 == 'plain' && $type0 == 'text')
         $suffix = 'txt';
         $suffix = 'txt';
     else if ($type1 == 'richtext' && $type0 == 'text')
     else if ($type1 == 'richtext' && $type0 == 'text')