MDL-25736 TinyMce Spellchecker French issues
authorIñaki Arenaza <iarenaza@mondragon.edu>
Sun, 4 Sep 2011 21:03:12 +0000 (23:03 +0200)
committerIñaki Arenaza <iarenaza@mondragon.edu>
Sat, 10 Nov 2012 19:02:03 +0000 (20:02 +0100)
GoogleSpell checker already returns data un UTF8, so there's no need
to use utf8_encode (in fact, using it completely mangles the string).

All credit goes to David Quintal for finding the issue and proposing
the fix.

lib/editor/tinymce/tiny_mce/3.5.1.1/plugins/spellchecker/classes/GoogleSpell.php

index afb60da..e3acf2d 100644 (file)
@@ -39,7 +39,7 @@ class GoogleSpell extends SpellChecker {
                $matches = $this->_getMatches($lang, $word);\r
 \r
                if (count($matches) > 0)\r
-                       $sug = explode("\t", utf8_encode($this->_unhtmlentities($matches[0][4])));\r
+                       $sug = explode("\t", $this->_unhtmlentities($matches[0][4]));\r
 \r
                // Remove empty\r
                foreach ($sug as $item) {\r