alecpl
2011-03-17 8b2c23d6035ed0dbfa460c2775a033df129d0918
- Use \n as a word separator to workaround some strange Google spellchecker issue


2 files modified
4 ■■■ changed files
program/steps/utils/spell_googie.inc 2 ●●●●● patch | view | raw | blame | history
program/steps/utils/spell_html_googie.inc 2 ●●● patch | view | raw | blame | history
program/steps/utils/spell_googie.inc
@@ -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))
program/steps/utils/spell_html_googie.inc
@@ -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>'