hiraeth / htmlpurifier
适用于Hiraeth Nano-Framework的HTMLPurifier
1.0.0
2024-03-14 09:14 UTC
Requires
- ezyang/htmlpurifier: ^4.9
- hiraeth/app: ^1.0
This package is auto-updated.
Last update: 2024-09-14 16:03:23 UTC
README
HTMLPurifier是一个强大且可高度配置的HTML内容过滤器,以确保用户输入的HTML的安全性和清洁性。
安装
composer require hiraeth/htmlpurifier
通过opus,将自动将htmlpurifier.jin
配置文件复制到您的config
目录。
代表
提供者
本包不包括提供者。
配置
; The location to store serialized purifier information. This is essentially a cache. cache_path = writable/cache/htmlpurifier ; Whether or not we should remove empty elements. Note that if this is set to true, elements ; containing only non-breaking space characters will also be removed. remove_empty = true ; Whether or not the HTML we're purifying should be considered trusted. trusted = false ; Forbidden HTML (attributes, elements, classes) forbidden = { "attributes": [], "elements": [], "classes": [] }
用法
有关如何使用净化器的更多信息,请参阅HTMLPurifier文档。随着时间的发展,将进行额外的配置标准化。如果您有特定的请求,请提交问题或拉取请求。