vdlp/oc-htmlpurifier-plugin
最新稳定版本:3.0.0
Composer 安装命令:
composer require vdlp/oc-htmlpurifier-plugin
包简介
Adds a standards compliant HTML filter to October CMS.
README 文档
README
An October CMS plugin which adds a standards compliant HTML filter to October CMS.
HTML Purifier is an HTML filtering solution that uses a unique combination of robust whitelists and agressive parsing to ensure that not only are XSS attacks thwarted, but the resulting HTML is standards compliant.
Installation
CLI:
php artisan plugin:install Vdlp.HtmlPurifier
October CMS:
Go to Settings > Updates & Plugins > Install plugins and search for 'HtmlPurifier'.
Configuration
To configure the filter execute this command:
php artisan vendor:publish --provider="Vdlp\HtmlPurifier\HtmlPurifierServiceProvider" --tag="config"
A configuration file named config/htmlpurifier.php is now created.
In depth information about configuration parameters can be found here: http://htmlpurifier.org/live/configdoc/plain.html
Usage
Use the `|purify' in your Twig templates to apply the HTML Purifier filter.
{{ contentFromCms|purify }}
{{ contentFromExternalSource|purify }}
or
{{ '<a href="" target="_blank">Some random HTML string</a>'|purify }}
For more information about templating in October CMS: http://octobercms.com/docs/markup/templating
统计信息
- 总下载量: 846
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2018-09-14