fix for personal names with "," inside it. This will fix wrong address
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 18 Sep 2003 19:20:26 +0000 (19:20 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 18 Sep 2003 19:20:26 +0000 (19:20 +0000)
parsing in case of replyall

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5727 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index dcbe0b631b354b7b69ba091fc9520cc6a922ed8c..f3d500889be7823c5235397fb3b4cff84b4d18ab 100644 (file)
@@ -128,6 +128,11 @@ function replyAllString($header) {
    $url_replytoallcc = '';
    foreach( $url_replytoall_ar as $email => $personal) {
       if ($personal) {
+         // if personal name contains address separator then surround
+         // the personal name with double quotes.
+         if (strpos($personal,',') !== false) {
+             $personal = '"'.$personal.'"';
+         }
          $url_replytoallcc .= ", $personal <$email>";
       } else {
          $url_replytoallcc .= ', '. $email;