From: Luca P. <lpa...@us...> - 2004-10-10 21:47:13
|
Update of /cvsroot/planeshift/planeshift/www/serverconsole/synonyms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27562 Modified Files: syn_actions.php Log Message: stripped \n \r at the end of each line when loading synonyms. Index: syn_actions.php =================================================================== RCS file: /cvsroot/planeshift/planeshift/www/serverconsole/synonyms/syn_actions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** syn_actions.php 25 Apr 2004 14:15:19 -0000 1.2 --- syn_actions.php 10 Oct 2004 21:47:03 -0000 1.3 *************** *** 65,68 **** --- 65,73 ---- $tok1esc = str_replace("'", "\\'", $tok1); $tok2esc = str_replace("'", "\\'", $tok2); + // remove end of line + $tok1esc = str_replace("\r","", $tok1esc); + $tok2esc = str_replace("\r","", $tok2esc); + $tok1esc = str_replace("\n","", $tok1esc); + $tok2esc = str_replace("\n","", $tok2esc); $query = "insert into npc_synonyms values('$tok1esc','$tok2esc')"; $result = mysql_query2($query); |