[Svn] r3033 - in trunk/roundcubemail: . program/include

trac at roundcube.net trac at roundcube.net
Mon Oct 12 11:44:04 CEST 2009


Author: alec
Date: 2009-10-12 04:44:04 -0500 (Mon, 12 Oct 2009)
New Revision: 3033

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/include/main.inc
   trunk/roundcubemail/program/include/rcube_vcard.php
Log:
- Fix importing/sending to email address with whitespace (#1486214)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2009-10-11 08:20:32 UTC (rev 3032)
+++ trunk/roundcubemail/CHANGELOG	2009-10-12 09:44:04 UTC (rev 3033)
@@ -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)

Modified: trunk/roundcubemail/program/include/main.inc
===================================================================
--- trunk/roundcubemail/program/include/main.inc	2009-10-11 08:20:32 UTC (rev 3032)
+++ trunk/roundcubemail/program/include/main.inc	2009-10-12 09:44:04 UTC (rev 3033)
@@ -946,7 +946,7 @@
 
 
 /**
- * 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 @@
   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);
   }
 
 

Modified: trunk/roundcubemail/program/include/rcube_vcard.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_vcard.php	2009-10-11 08:20:32 UTC (rev 3032)
+++ trunk/roundcubemail/program/include/rcube_vcard.php	2009-10-12 09:44:04 UTC (rev 3033)
@@ -269,6 +269,7 @@
 
         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]))

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list