From d4fc673006523d2a972a74943f880fcd47c658dd Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 16 Nov 2005 15:49:22 +0000 Subject: [PATCH] r8903@llin: dpavlin | 2005-11-16 16:49:47 +0100 strip newlines from beginning of file also git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@68 07558da8-63fa-0310-ba24-9fe276d99e06 --- web/browse.cgi | 1 + 1 file changed, 1 insertion(+) diff --git a/web/browse.cgi b/web/browse.cgi index f55749a..916d946 100755 --- a/web/browse.cgi +++ b/web/browse.cgi @@ -54,6 +54,7 @@ sub update_file($$) { return $iconv_loc->convert(chr(hex($t))); } $content =~ s/%u([a-fA-F0-9]{4})/_conv_js($1)/gex; + $content =~ s/^[\n\r]+//s; $content =~ s/[\n\r]+$//s; write_file($path . '.new', $content) || die "can't save ${path}.new $!"; -- 2.20.1