[Svn] r4612 - trunk/roundcubemail/program/steps/utils

trac at roundcube.net trac at roundcube.net
Thu Mar 17 20:50:13 CET 2011


Author: alec
Date: 2011-03-17 14:50:13 -0500 (Thu, 17 Mar 2011)
New Revision: 4612

Modified:
   trunk/roundcubemail/program/steps/utils/spell_googie.inc
   trunk/roundcubemail/program/steps/utils/spell_html_googie.inc
Log:
- Use \n as a word separator to workaround some strange Google spellchecker issue


Modified: trunk/roundcubemail/program/steps/utils/spell_googie.inc
===================================================================
--- trunk/roundcubemail/program/steps/utils/spell_googie.inc	2011-03-17 18:25:42 UTC (rev 4611)
+++ trunk/roundcubemail/program/steps/utils/spell_googie.inc	2011-03-17 19:50:13 UTC (rev 4612)
@@ -41,6 +41,8 @@
   }
 
 $data = file_get_contents('php://input');
+// Google has some problem with spaces, use \n instead
+$data = str_replace(' ', "\n", $data);
 $store = "";
 
 if ($fp = fsockopen($host, $port, $errno, $errstr, 30))

Modified: trunk/roundcubemail/program/steps/utils/spell_html_googie.inc
===================================================================
--- trunk/roundcubemail/program/steps/utils/spell_html_googie.inc	2011-03-17 18:25:42 UTC (rev 4611)
+++ trunk/roundcubemail/program/steps/utils/spell_html_googie.inc	2011-03-17 19:50:13 UTC (rev 4612)
@@ -80,7 +80,7 @@
   $path = $a_uri['path'] . ($a_uri['query'] ? '?'.$a_uri['query'] : '') . $lang;
   }
 
-$wordstr = implode(' ', (array) $data);
+$wordstr = implode("\n", (array) $data);
 $data = '<?xml version="1.0" encoding="utf-8" ?>'
     .'<spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1">'
     .'<text>' . $wordstr . '</text>'

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



More information about the Svn mailing list