From 3e8477160e6d22ec3b229be93b2820006bef65e5 Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Thu, 27 Nov 2008 01:09:03 +0000 Subject: [PATCH] remove \r in property strings git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@202 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/webim/libs/common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index dfac34d3..16589d85 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -163,7 +163,7 @@ function save_message($locale,$key,$value) { if($keyval[0] == 'encoding') { $current_encoding = trim($keyval[1]); } else if(!$added && $keyval[0] == $key) { - $line = "$key=".myiconv($webim_encoding, $current_encoding, str_replace("\n", "\\n",trim($value)))."\n"; + $line = "$key=".myiconv($webim_encoding, $current_encoding, str_replace("\r", "",str_replace("\n", "\\n",trim($value))))."\n"; $added = true; } } @@ -171,7 +171,7 @@ function save_message($locale,$key,$value) { } fclose($fp); if(!$added) { - $result .= "$key=".myiconv($webim_encoding, $current_encoding, str_replace("\n", "\\n",trim($value)))."\n"; + $result .= "$key=".myiconv($webim_encoding, $current_encoding, str_replace("\r", "",str_replace("\n", "\\n",trim($value))))."\n"; } $fp = fopen(dirname(__FILE__)."/../locales/$locale/properties", "w"); fwrite($fp, $result);