- Use \n as a word separator to workaround some strange Google spellchecker issue

release-0.6
alecpl 14 years ago
parent a8317ef172
commit 8b2c23d603

@ -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))

@ -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>'

Loading…
Cancel
Save