X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/177fd6fefd2e3d5a0ea6591c71d660cabdb3c1a4..5964d2279dc52bdfe105f9bfa17e04337d47a3fa:/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php index 00c9f9f4..03e4a784 100644 --- a/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php @@ -2,6 +2,7 @@ /** * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ * + * @package MCManager.includes * @author Moxiecode * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. */ @@ -49,7 +50,9 @@ class GoogleSpell extends SpellChecker { 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"; @@ -104,7 +107,7 @@ class GoogleSpell extends SpellChecker { 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); @@ -155,4 +158,4 @@ if (!function_exists('mb_substr')) { } } -?> \ No newline at end of file +?>