[英]Javascript & jQuery escaping quotes
I'm trying to do inline editing for my website using jQuery so I can edit the HTML and text of a page without having to change the source. 我正在尝试使用jQuery对我的网站进行内联编辑,以便无需更改源就可以编辑页面的HTML和文本。 When I submit the form data though jQuery's $.ajax function, it escapes all the quotes.
当我通过jQuery的$ .ajax函数提交表单数据时,它会转义所有引号。 How can I either prevent jQuery from escaping this(probably a bad idea) or remove them on the PHP side of things.
如何防止jQuery转义(可能是个坏主意)或从PHP方面删除它们。 I tired stripslashes...but that didn't do anything.
我厌倦了脱衣舞...但是那没做。 I know it's jQuery because if I do htmlentities() before submitting the text to MySQL...the slashes are still added.
我知道它是jQuery,因为如果在将文本提交给MySQL之前执行htmlentities(),则仍会添加斜杠。
It's not jQuery that's magic_quotes
in PHP. 不是jQuery,而是PHP中的
magic_quotes
。 Here's how you can remove them. 这是删除它们的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.