浏览代码

add proper decoding to To fields, thanks Thierry Godefroy

Thijs Kinkhorst 17 年之前
父节点
当前提交
67af44522e
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/read_body.php

+ 3 - 2
src/read_body.php

@@ -355,9 +355,10 @@ function formatRecipientString($recipients, $item ) {
         $a = array();
         foreach ($recipients as $r) {
             $a[] = array(
-                            'Name'  => htmlspecialchars($r->getAddress(false)),
+                            // note: decodeHeader is htmlsafe by default
+                            'Name'  => decodeHeader($r->getAddress(false)),
                             'Email' => htmlspecialchars($r->getEmail()),
-                            'Full'  => htmlspecialchars($r->getAddress(true))
+                            'Full'  => decodeHeader($r->getAddress(true))
                         );
         }