开发者

jQuery ajax call: " turns out \"

Hey, i noticed when my ajax response (msg) gets prepended and toggled, if it contains " or ' it turns out \" and \'.

How can 开发者_高级运维i fix this?


Show us your server side code.

but it looks like your using addslashes on the content before your sending it.

for example

$string = "I love biscuit's";

$string = addslashes($string); //I love biscuit\'s

//now its slashed, remove them
$string = stripslashes($string); // I love biscuit's
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜