remove \r in property strings

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@202 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2008-11-27 01:09:03 +00:00
parent 313669a208
commit 3e8477160e

View File

@ -163,7 +163,7 @@ function save_message($locale,$key,$value) {
if($keyval[0] == 'encoding') { if($keyval[0] == 'encoding') {
$current_encoding = trim($keyval[1]); $current_encoding = trim($keyval[1]);
} else if(!$added && $keyval[0] == $key) { } 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; $added = true;
} }
} }
@ -171,7 +171,7 @@ function save_message($locale,$key,$value) {
} }
fclose($fp); fclose($fp);
if(!$added) { 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"); $fp = fopen(dirname(__FILE__)."/../locales/$locale/properties", "w");
fwrite($fp, $result); fwrite($fp, $result);