浏览代码

Fixed bug that ignored lowercase quoted printable in headers.

gustavf 25 年之前
父节点
当前提交
1485f5dc0b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      functions/mime.php

+ 5 - 0
functions/mime.php

@@ -525,6 +525,11 @@
             $replace = base64_decode($res[3]);
          } else {
             $replace = ereg_replace("_", " ", $res[3]);
+	    // Convert lowercase Quoted Printable to uppercase for
+	    // quoted_printable_decode to understand it.
+	    while (ereg("(=([0-9][a-f])|([a-f][0-9]))", $replace, $res)) {
+	       $replace = str_replace($res[1], strtoupper($res[1]), $replace);
+	    }
             $replace = quoted_printable_decode($replace);
          }