2012-03-16 20 views
0

我在我的网站上使用ckeditor,并且在顶部显示章节名称时我有一个单独的框。CKEditor在我的页面上每次使用撇号保存某些内容

<input type="text" id="chapter" name="chapter" value="'.$chapter_title.'"/> 

每次我保存CKeditor页面时,当我有一个apostrophie它把一个\的章节名称。

eg. John's becomes John\'s 
Then each time I save it adds more \ 
so second time John's becomes John\\'s then third time John\\\'s etc. 

有没有人知道如何制止这个请?

+0

[CKEditor在HTML标记中保存带有额外斜杠的文本]的可能重复(http://stackoverflow.com/questions/1749720/ckeditor-is-saving-text-with-extra-slashes-in-html-tags ) – CodeCaster 2012-03-16 09:52:43

回答

0

阅读关于功能addslashes()stripslashes()

+0

是php函数还是ckeditor函数? – Dom 2012-03-16 09:45:33

+0

他们是PHP的功能。我不认识chkeditor。您可能需要查看phpinfo中的服务器设置'magic_quotes_gpc'并查看它是否被关闭(默认为打开)。 – user783322 2012-03-16 09:53:46

+0

http://cksource.com/forums/viewtopic.php?f=6&t=13686 – user783322 2012-03-16 09:57:31

1

也许你的magic_quotes_gpc已打开?

0

在回显内容之前使用php函数stripslashes()。

相关问题