2012-03-16 21 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()。

相關問題