Closed GoogleCodeExporter closed 9 years ago
After some research I figured out that the problem was caused by
CJavaScript::quote
function where the string substitutions take place:
return
strtr($js,array("\t"=>'\t',"\n"=>'\n',"\r"=>'\r','"'=>'\"','\''=>'\\\'','\\'=>'\
\\\'));
More specifically, I removed the: '\\'=>'\\\\' part and doesn't escape the \
character any more.
Original comment by g.chatzidamianos@gmail.com
on 1 May 2009 at 2:07
In your original message, you can use: "something \n else", instead of
'something \n
else'. This will give you the expected result when using CJavaScript::quote().
Original comment by qiang.xue
on 5 May 2009 at 7:39
When the confirm message is asigned to a variable before using it in the confim
message (i.e. it was saved in a database), then the \n is not escaped
correctly. How
can this be done correctly.
Original comment by photobo...@gmail.com
on 10 May 2010 at 9:05
Original issue reported on code.google.com by
g.chatzidamianos@gmail.com
on 1 May 2009 at 7:50