summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-01-16 19:32:58 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-01-16 19:32:58 +0000
commite18d58d9854e35b6e097c6cf7a3f4df099a1b4ba (patch)
tree46636f7a50396bb709385319f3fc04ea3e502e2b /roundcubemail/program/include
parent8031d881c66d944fceae0bffe8144647cb61ab4e (diff)
- Fix address names with '@' sign handling (#1485654)
git-svn-id: https://svn.roundcube.net/trunk@2234 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/rcube_imap.php6
1 files changed, 3 insertions, 3 deletions
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])</", "$1 <", $val);
@@ -2942,8 +2942,8 @@ class rcube_imap
foreach ($sub_a as $k => $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));
}