From b9a57c3103a9d2ea9cb76aedf5c75d5029e06413 Mon Sep 17 00:00:00 2001 From: alec Date: Thu, 17 Mar 2011 19:50:13 +0000 Subject: - Use \n as a word separator to workaround some strange Google spellchecker issue git-svn-id: https://svn.roundcube.net/trunk@4612 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/utils/spell_googie.inc | 2 ++ roundcubemail/program/steps/utils/spell_html_googie.inc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roundcubemail/program/steps/utils/spell_googie.inc b/roundcubemail/program/steps/utils/spell_googie.inc index 4417da843..bb6b9e106 100644 --- a/roundcubemail/program/steps/utils/spell_googie.inc +++ b/roundcubemail/program/steps/utils/spell_googie.inc @@ -41,6 +41,8 @@ if (!empty($CONFIG['spellcheck_uri'])) } $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)) diff --git a/roundcubemail/program/steps/utils/spell_html_googie.inc b/roundcubemail/program/steps/utils/spell_html_googie.inc index 73011f5b9..ceda62687 100644 --- a/roundcubemail/program/steps/utils/spell_html_googie.inc +++ b/roundcubemail/program/steps/utils/spell_html_googie.inc @@ -80,7 +80,7 @@ if (!empty($CONFIG['spellcheck_uri'])) $path = $a_uri['path'] . ($a_uri['query'] ? '?'.$a_uri['query'] : '') . $lang; } -$wordstr = implode(' ', (array) $data); +$wordstr = implode("\n", (array) $data); $data = '' .'' .'' . $wordstr . '' -- cgit v1.2.3