]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php
Wordpress 3.5
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / spellchecker / classes / GoogleSpell.php
index 38daa06627b092cf24dc9ce5da4538c69c08a227..03e4a7848ef5213b10166d8a81af03ec79935f78 100644 (file)
@@ -50,7 +50,9 @@ class GoogleSpell extends SpellChecker {
                return $osug;
        }
 
                return $osug;
        }
 
-       function &_getMatches($lang, $str) {
+       protected function &_getMatches($lang, $str) {
+               $lang = preg_replace('/[^a-z\-]/i', '', $lang);
+               $str = preg_replace('/[\x00-\x1F\x7F]/', '', $str);
                $server = "www.google.com";
                $port = 443;
                $path = "/tbproxy/spell?lang=" . $lang . "&hl=en";
                $server = "www.google.com";
                $port = 443;
                $path = "/tbproxy/spell?lang=" . $lang . "&hl=en";
@@ -105,7 +107,7 @@ class GoogleSpell extends SpellChecker {
                return $matches;
        }
 
                return $matches;
        }
 
-       function _unhtmlentities($string) {
+       protected function _unhtmlentities($string) {
                $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
                $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
 
                $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
                $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);