浏览代码

fixing multiline headers. space or tab should not be removed.
tab is replaced by space, because it is later used split decoded string into chunks

tokul 21 年之前
父节点
当前提交
2cea5ee40c
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      class/mime/Rfc822Header.class.php
  2. 1 1
      functions/imap_messages.php

+ 1 - 1
class/mime/Rfc822Header.class.php

@@ -44,7 +44,7 @@ class Rfc822Header {
             $hdr = implode('', $hdr);
         }
         /* First we unfold the header */
-        $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array('', ''), $hdr));
+        $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array(' ', ' '), $hdr));
 
         /* Now we can make a new header array with */
         /* each element representing a headerline  */

+ 1 - 1
functions/imap_messages.php

@@ -621,7 +621,7 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list, $show_num=false)
                 $header = parseString($read,$i);
                 if ($header === false) break 3;
                 /* First we unfold the header */
-                $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array('', ''), $header));
+                $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array(' ', ' '), $header));
                 /* Now we can make a new header array with */
                 /* each element representing a headerline  */
                 $hdr = explode("\r\n" , $hdr);