2011-06-13 34 views
0

當我使用反斜槓提交頁面時,CKEditor正在轉義所有HTML屬性。CKEditor向具有屬性的HTML標記添加反斜槓

<img alt=\"\" src=\"/ckfinder/userfiles/images/a.jpg\" style=\"width: 600px; height: 450px;\" /> 

它在我的本地機器上正常工作,並且問題只發生在現場服務器中。

可能是什麼問題?

+0

看起來像是用PHP魔術引號!我沒有太多的PHP ..誰能告訴我如何避免這個? – 2011-06-13 07:23:40

回答

2

使用示例代碼PHP手冊固定它

function strip_magic_slashes($str) { return get_magic_quotes_gpc() ? stripslashes($str) : $str; }