Are there any good PHP based HTML filters available?

后端 未结 7 1847
死守一世寂寞
死守一世寂寞 2020-12-30 07:01

I am currently in a project with a PHP frontend. We\'re pretty concerned about security, because we\'ll have quite a lot of users and are an attractive target for hackers. O

7条回答
  •  悲哀的现实
    2020-12-30 07:33

    kses works well. You can easily specify which elements to allow and disallow, so making it ‘HTML5-aware’ would just be a matter of setting an array.

    WordPress uses it, so I guess it’s pretty safe ;)

提交回复
热议问题