mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'w51_MDL-37283_m23_spell' of git://github.com/skodak/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
ca0cbfd4db
2 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
Version 2.0.6.1 (2012-11-16)
|
||||||
|
Fixed security issue with google spellchecker.
|
||||||
Version 2.0.6 (2011-09-29)
|
Version 2.0.6 (2011-09-29)
|
||||||
Fixed incorrect position of suggestion menu.
|
Fixed incorrect position of suggestion menu.
|
||||||
Fixed handling of mispelled words with no suggestions in PSpellShell engine.
|
Fixed handling of mispelled words with no suggestions in PSpellShell engine.
|
||||||
|
|
|
@ -51,6 +51,8 @@ class GoogleSpell extends SpellChecker {
|
||||||
}
|
}
|
||||||
|
|
||||||
function &_getMatches($lang, $str) {
|
function &_getMatches($lang, $str) {
|
||||||
|
$lang = preg_replace('/[^a-z\-]/i', '', $lang); // Sanitize, remove everything but a-z or -
|
||||||
|
$str = preg_replace('/[\x00-\x1F\x7F]/', '', $str); // Sanitize, remove all control characters
|
||||||
$server = "www.google.com";
|
$server = "www.google.com";
|
||||||
$port = 443;
|
$port = 443;
|
||||||
$path = "/tbproxy/spell?lang=" . $lang . "&hl=en";
|
$path = "/tbproxy/spell?lang=" . $lang . "&hl=en";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue