From c58c0aedbaab765406de262f792b0998da151812 Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 16 Jan 2009 19:32:58 +0000 Subject: - Fix address names with '@' sign handling (#1485654) --- program/include/rcube_imap.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'program/include') diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 36a346300..9fae0c672 100644 --- a/program/include/rcube_imap.php +++ b/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