[Svn] r4656 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Thu Apr 14 14:46:09 CEST 2011


Author: alec
Date: 2011-04-14 07:46:09 -0500 (Thu, 14 Apr 2011)
New Revision: 4656

Modified:
   trunk/roundcubemail/program/include/iniset.php
   trunk/roundcubemail/program/include/rcube_vcard.php
Log:
- Fixed vcard folding: use one space, use mb_regex_encoding() (#1487868)


Modified: trunk/roundcubemail/program/include/iniset.php
===================================================================
--- trunk/roundcubemail/program/include/iniset.php	2011-04-14 08:30:37 UTC (rev 4655)
+++ trunk/roundcubemail/program/include/iniset.php	2011-04-14 12:46:09 UTC (rev 4656)
@@ -74,10 +74,11 @@
 @set_time_limit(120);
 
 // set internal encoding for mbstring extension
-if(extension_loaded('mbstring'))
+if (extension_loaded('mbstring')) {
     mb_internal_encoding(RCMAIL_CHARSET);
+    @mb_regex_encoding(RCMAIL_CHARSET);
+}
 
-
 /**
  * Use PHP5 autoload for dynamic class loading
  * 

Modified: trunk/roundcubemail/program/include/rcube_vcard.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_vcard.php	2011-04-14 08:30:37 UTC (rev 4655)
+++ trunk/roundcubemail/program/include/rcube_vcard.php	2011-04-14 12:46:09 UTC (rev 4656)
@@ -467,16 +467,16 @@
   {
     // use mb string function if available
     if (function_exists('mb_ereg_replace')) {
-      return ":\n  " . mb_ereg_replace('(.{70})', "\\1\n  ", $matches[1]);
+      return ":\n " . mb_ereg_replace('(.{70})', "\\1\n ", $matches[1]);
     }
     
     // chunk_split string and avoid lines breaking multibyte characters
     $c = 66;
-    $out = ":\n  " . substr($matches[1], 0, $c);
+    $out = ":\n " . substr($matches[1], 0, $c);
     for ($n = $c; $c < strlen($matches[1]); $c++) {
       // break if length > 70 or mutlibyte character starts after position 66
       if ($n > 70 || ($n > 66 && ord($matches[1][$c]) >> 6 == 3)) {
-        $out .= "\n  ";
+        $out .= "\n ";
         $n = 0;
       }
       $out .= $matches[1][$c];

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



More information about the Svn mailing list