CKeditor在<;中添加内容时添加反斜杠;span>;没有格式的标记

CKeditor在<;中添加内容时添加反斜杠;span>;没有格式的标记,ckeditor,Ckeditor,我觉得ckeditor的行为很奇怪,因为它在添加内容时向span标记添加了反斜杠。 例如: <span style=\"color:#006400;\"><span>this is a comment......Must be green, but it is white</span></span> 这是一条评论……必须是绿色,但它是白色的 但应该是这样的: <span style="color:#008000;">this is

我觉得ckeditor的行为很奇怪,因为它在添加内容时向span标记添加了反斜杠。 例如:

<span style=\"color:#006400;\"><span>this is a comment......Must be green, but it is white</span></span>
这是一条评论……必须是绿色,但它是白色的
但应该是这样的:

<span style="color:#008000;">this is a comment......Must be green, but it is white</span></span>
这是一条评论……必须是绿色,但它是白色的
为什么会这样?
此问题不是在本地计算机(localhost)上实时发生的。

这是一个与托管服务相关的问题。出于安全原因,它们在每个引号和双引号前添加反斜杠。要解决此问题,可以在PHP中使用stripslashes函数:

stripslashes($_POST['comment'])

有一个类似的问题,您是否使用任何类型的框架?不,我没有使用任何这样的框架。您如何处理post数据?php可能正在为您转义它。我正在插入数据库表的字段,然后使用CKEDITOr.replace('field_name')。您的问题是,live server上启用了神奇的引号。