From 020181047dbe8aea51e25094ac04a7177bcb8b0c Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 23 May 2003 14:25:55 +0000 Subject: [PATCH] Some hacks to stop the addition of blank lines on Windows machines during editing in the web forms. --- admin/lang.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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); -- 2.39.5