summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-03-31 12:32:44 +0000
committeralecpl <alec@alec.pl>2011-03-31 12:32:44 +0000
commit382b8b1351e1a4598f04ab184cec803b96d7e4b7 (patch)
tree4a168a018618445f53afd5aa651fb655e68149d9 /program/steps
parent5228a5558f0ee9af785f1b4cdcef4d97b17b33f6 (diff)
- Applied fixes from trunk
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/utils/spell_googie.inc2
-rw-r--r--program/steps/utils/spell_html_googie.inc2
2 files changed, 3 insertions, 1 deletions
diff --git a/program/steps/utils/spell_googie.inc b/program/steps/utils/spell_googie.inc
index 4c98dd697..269d792dd 100644
--- a/program/steps/utils/spell_googie.inc
+++ b/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/program/steps/utils/spell_html_googie.inc b/program/steps/utils/spell_html_googie.inc
index 1a4fbd48d..df18c036b 100644
--- a/program/steps/utils/spell_html_googie.inc
+++ b/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 = '<?xml version="1.0" encoding="utf-8" ?>'
.'<spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1">'
.'<text>' . $wordstr . '</text>'