summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-10-12 09:44:04 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-10-12 09:44:04 +0000
commitaf6b2a680a1c1876954c83ff492e6ae38e4c8e60 (patch)
tree67a3c0a0a6d368cf94835d29fc1cc3673d745bb1
parent356ffda0ed7180c0f21c2c2ae731cd59dd64184e (diff)
- Fix importing/sending to email address with whitespace (#1486214)
git-svn-id: https://svn.roundcube.net/trunk@3033 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/CHANGELOG3
-rw-r--r--roundcubemail/program/include/main.inc6
-rw-r--r--roundcubemail/program/include/rcube_vcard.php1
3 files changed, 6 insertions, 4 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG
index 05ca7b064..297582248 100644
--- a/roundcubemail/CHANGELOG
+++ b/roundcubemail/CHANGELOG
@@ -1,7 +1,8 @@
CHANGELOG RoundCube Webmail
===========================
-- Added XIMSS (Communigate) driver for Password plugin
+- Fix importing/sending to email address with whitespace (#1486214)
+- Added XIMSS (CommuniGate) driver for Password plugin
- Fix newly attached files are not saved in drafts w/o editing any text (#1486202)
- Added attachment upload indicator with parallel upload (#1486058)
- Use default_charset for bodies of messages without charset definition (#1486187)
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index 6e4cbe1bc..e96840003 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/program/include/main.inc
@@ -946,7 +946,7 @@ function format_date($date, $format=NULL)
/**
- * Compose a valid representaion of name and e-mail address
+ * Compose a valid representation of name and e-mail address
*
* @param string E-mail address
* @param string Person name
@@ -957,10 +957,10 @@ function format_email_recipient($email, $name='')
if ($name && $name != $email)
{
// Special chars as defined by RFC 822 need to in quoted string (or escaped).
- return sprintf('%s <%s>', preg_match('/[\(\)\<\>\\\.\[\]@,;:"]/', $name) ? '"'.addcslashes($name, '"').'"' : $name, $email);
+ return sprintf('%s <%s>', preg_match('/[\(\)\<\>\\\.\[\]@,;:"]/', $name) ? '"'.addcslashes($name, '"').'"' : $name, trim($email));
}
else
- return $email;
+ return trim($email);
}
diff --git a/roundcubemail/program/include/rcube_vcard.php b/roundcubemail/program/include/rcube_vcard.php
index 7dbbb3f71..f574eed14 100644
--- a/roundcubemail/program/include/rcube_vcard.php
+++ b/roundcubemail/program/include/rcube_vcard.php
@@ -269,6 +269,7 @@ class rcube_vcard
foreach($regs2[1] as $attrid => $attr) {
if ((list($key, $value) = explode('=', $attr)) && $value) {
+ $value = trim($value);
if ($key == 'ENCODING') {
// add next line(s) to value string if QP line end detected
while ($value == 'QUOTED-PRINTABLE' && preg_match('/=$/', $lines[$i]))