PHP HTML sanitizer

余生颓废 提交于 2019-11-30 09:34:01

问题


I'm wondering if anybody has used this class and found it to be reliable?

http://www.phpclasses.org/package/3746-PHP-Remove-unsafe-tags-and-attributes-from-HTML-code.html

Many thanks!


回答1:


i recommend http://htmlpurifier.org/ HTML Purifier for cleaning strings safely.




回答2:


I'm wondering if anybody has used this class and found it to be reliable?

erm....

1) phpclasses invites feedback from users - if there's no feedback there, why do you think you'd find it here?

2) its a fairly generic bit of code - the value is in how you apply it, you don't state what your objectives are nor what you've compared it with,

3) certainly the code looks to be competently written and allows a much finer level of control than striptags() but as in 2 we can't say what value that is to you without any information about what you are trying to achieve.

C.



来源:https://stackoverflow.com/questions/2721184/php-html-sanitizer

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