From: moodler Date: Sun, 2 Feb 2003 02:37:09 +0000 (+0000) Subject: Add better escaping for double quotes X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ecc114ee3b59227d2c1cfe08d87b3400ee89c2f5;p=moodle.git Add better escaping for double quotes --- diff --git a/admin/lang.php b/admin/lang.php index d83007bc6d..0b3518d915 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -261,7 +261,7 @@ function lang_save_file($path, $file, $strings) { $value = str_replace("\\","",$value); // Delete all slashes } $value = str_replace("$"."a", "\\$"."a", $value); // Add slashes for $a - $value = str_replace("\"", "\\\"", $value); // Add slashes for " + $value = str_replace("\"", "\\\\\\\"", $value); // Add slashes for " $value = str_replace("%","%%",$value); // Escape % characters if ($id == "string" and $value != ""){ fwrite($f,"\$string['$stringname'] = \"$value\";\n");