Browse Source

add proper decoding to To fields, thanks Thierry Godefroy

Thijs Kinkhorst 17 năm trước cách đây
mục cha
commit
67af44522e
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  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))
                         );
         }