firmaprofesional / htmlpurifier
使用PHP编写的符合标准的HTML过滤器
1.0.1
2023-11-16 09:48 UTC
Requires
- php: ~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0
Requires (Dev)
- cerdic/css-tidy: ^1.7 || ^2.0
- simpletest/simpletest: dev-master
Suggests
- ext-bcmath: Used for unit conversion and imagecrash protection
- ext-iconv: Converts text to and from non-UTF-8 encodings
- ext-tidy: Used for pretty-printing HTML
- cerdic/css-tidy: If you want to use the filter 'Filter.ExtractStyleBlocks'.
This package is auto-updated.
Last update: 2024-09-16 11:49:50 UTC
README
HTML Purifier是一个使用独特组合的强大白名单和积极解析的HTML过滤解决方案,确保不仅阻止了XSS攻击,而且生成的HTML符合标准。
HTML Purifier面向来自不可信来源的富格式文档,这些文档需要CSS和完整的标签集。此库可以配置为接受更严格的标签集,但效率可能不如更简化的解析器。然而,它将正确完成任务,这可能更为重要。
相关链接
- 查看INSTALL以获取快速安装指南
- 查看docs/以获取面向开发者的文档、代码示例和深入安装指南。
- 查看WYSIWYG以获取有关TinyMCE和FCKeditor等编辑器的信息
HTML Purifier可以在以下网址找到:http://htmlpurifier.org/
安装
该软件包可在Composer上找到。
如果您使用Composer管理依赖项,可以使用
$ composer require ezyang/htmlpurifier