Is CKeditor safe for letting end-users submit content?

两盒软妹~` 提交于 2019-12-24 04:47:05

问题


I am about to let some users publish articles on my site.

To make it easier for them, I was thinking of using a CKeditor, let them have links, images, formating, etc ...

However I was thinking of javascript. Can someone inject javascript or will CKeditor clean it up? Do I need my own filtering?


回答1:


Content submitted by the user should always be checked, even if an application like CKeditor generates valid code. You can use HTMLPurifier for serverside sanitizing.



来源:https://stackoverflow.com/questions/3876203/is-ckeditor-safe-for-letting-end-users-submit-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!