]> git.mjollnir.org Git - moodle.git/commitdiff
Strip linefeed characters \r from multi-line strings
authormoodler <moodler>
Mon, 2 Feb 2004 04:19:56 +0000 (04:19 +0000)
committermoodler <moodler>
Mon, 2 Feb 2004 04:19:56 +0000 (04:19 +0000)
admin/lang.php

index d13625e8491f282d3d6be0c973693f2410d2c34d..2f73fe75e24370599c93e8e6e8622c55da8c59a3 100644 (file)
@@ -291,6 +291,7 @@ function lang_save_file($path, $file, $strings) {
         $value = str_replace("'", "\\'", $value);           // Add slashes for '
         $value = str_replace('"', "\\\"", $value);          // Add slashes for "
         $value = str_replace("%","%%",$value);              // Escape % characters
+        $value = str_replace("\r", "",$value);              // Remove linefeed characters
         if ($id == "string" and $value != ""){
             fwrite($f,"\$string['$stringname'] = '$value';\n");
         }