From: stronk7 Date: Wed, 8 Aug 2007 22:18:17 +0000 (+0000) Subject: Now sybase quotes are properly handled by the lang editor. Part of MDL-9835 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ac20257aae95e633d69468770646e3f90c4f302c;p=moodle.git Now sybase quotes are properly handled by the lang editor. Part of MDL-9835 Merged from MOODLE_18_STABLE --- diff --git a/admin/lang.php b/admin/lang.php index 761224de82..f305eeb161 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -628,6 +628,9 @@ function lang_fix_value_before_save($value='') { if ($CFG->lang != "zh_hk" and $CFG->lang != "zh_tw") { // Some MB languages include backslash bytes $value = str_replace("\\","",$value); // Delete all slashes } + if (ini_get_bool('magic_quotes_sybase')) { // Unescape escaped sybase quotes + $value = str_replace("''", "'", $value); + } $value = str_replace("'", "\\'", $value); // Add slashes for ' $value = str_replace('"', "\\\"", $value); // Add slashes for " $value = str_replace("%","%%",$value); // Escape % characters