From e18d58d9854e35b6e097c6cf7a3f4df099a1b4ba Mon Sep 17 00:00:00 2001 From: alec Date: Fri, 16 Jan 2009 19:32:58 +0000 Subject: - Fix address names with '@' sign handling (#1485654) git-svn-id: https://svn.roundcube.net/trunk@2234 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_imap.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'roundcubemail/program/include') diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index 36a346300..9fae0c672 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -2933,7 +2933,7 @@ class rcube_imap // remove any newlines and carriage returns before $a = $this->_explode_quoted_string('[,;]', preg_replace( "/[\r\n]/", " ", $str)); $result = array(); - + foreach ($a as $key => $val) { $val = preg_replace("/([\"\w]) $v) { - if (strpos($v, '@') > 0) - $result[$key]['address'] = str_replace('<', '', str_replace('>', '', $v)); + if (preg_match('/^<\S+@\S+>$/', $v)) + $result[$key]['address'] = trim($v, '<>'); else $result[$key]['name'] .= (empty($result[$key]['name'])?'':' ').str_replace("\"",'',stripslashes($v)); } -- cgit v1.2.3