htmlpurifier这个类库为啥容量这么大

WBOY
Release: 2016-06-13 12:27:10
Original
1078 people have browsed it

htmlpurifier这个类库为什么容量这么大
RT,自己写了个站,自己写的富文本编辑器,富文本过滤实在不想自己写了,网上找到这个类库,结果被1.03MB的容量吓到了,我3个站都没这么大
标准版里面有354个文件,应该不会全部都用到吧?
具体会用到哪些文件啊?
还有没有别的比较好用的富文本过滤类库?
------解决思路----------------------
因为提供的功能比较多。如果你不需要用到这么多。
可以试试这个类http://blog.csdn.net/fdipzone/article/details/11884285
------解决思路----------------------
不知道为什么要过滤
1、如果你允许用户提交一些代码(比如这里)但只是为了显示,那么过滤掉了不就没有没了吗?
2、如果你允许用户提交可执行的代码,那么你依据什么来判定哪部分是有害的呢?过滤掉了还能执行吗?

如果你只允许提交用于控制格式的有限标记,那么 strip_tags 函数就已经能满足你的要求了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!