From: moodler Date: Fri, 23 May 2003 14:25:55 +0000 (+0000) Subject: Some hacks to stop the addition of blank lines on Windows machines during editing... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=020181047dbe8aea51e25094ac04a7177bcb8b0c;p=moodle.git Some hacks to stop the addition of blank lines on Windows machines during editing in the web forms. --- diff --git a/admin/lang.php b/admin/lang.php index 763c3fe23b..ec8bfe2bb1 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -144,7 +144,7 @@ echo ""; foreach ($stringfiles as $file) { - + print_heading("$file", "LEFT", 4); if (!file_exists("$langdir/$file")) { @@ -184,7 +184,14 @@ echo "cellheading\" NOWRAP VALIGN=TOP>$key"; echo "cellheading\" VALIGN=TOP>$envalue"; - $value = str_replace("\\","",$string[$key]); // Delete all slashes + $value = $string[$key]; + $value = str_replace("\r","",$value); + $value = str_replace("\n\n\n\n\n\n","\n",$value); + $value = str_replace("\n\n\n\n\n","\n",$value); + $value = str_replace("\n\n\n\n","\n",$value); + $value = str_replace("\n\n\n","\n",$value); + $value = str_replace("\n\n\n","\n",$value); + $value = str_replace("\\","",$value); // Delete all slashes $value = str_replace("%%","%",$value); $value = htmlspecialchars($value);