Place quotes around the real name portion of addresses when putting them on the compo...
[squirrelmail.git] / functions / addressbook.php
index 0c68958d225c623c99938a60addbeff64a61f451..905e630af022cff95b0779e62d915f09877828c5 100644 (file)
@@ -517,9 +517,9 @@ class AddressBook {
         global $data_dir, $username;
         $addrsrch_fullname = getPref($data_dir, $username, 'addrsrch_fullname');
         if ($addrsrch_fullname == 'fullname')
-            return $row['name'] . ' <' . trim($row['email']) . '>';
+            return '"' . $row['name'] . '" <' . trim($row['email']) . '>';
         else if ($addrsrch_fullname == 'nickname')
-            return $row['nickname'] . ' <' . trim($row['email']) . '>';
+            return '"' . $row['nickname'] . '" <' . trim($row['email']) . '>';
         else // "noprefix"
             return trim($row['email']);
     }