g4b0/htmlpurifier
最新稳定版本:2.0.2
Composer 安装命令:
composer require g4b0/htmlpurifier
包简介
A simple wrapper around HtmlPurifier [http://htmlpurifier.org/]
README 文档
README
A simple wrapper around HtmlPurifier [http://htmlpurifier.org/]
Introduction
This module adds a wrapper named Purifier around the famous HtmlPurifier. You can use HtmlPurifier by itself, or use some of the custom function to have clean HTML or XHTML code, TXT code or to strip the [embed] tags. It's also possible to extend the Purifier class to add your own purifier functions.
Requirements
- SilverStripe >= 4.1 < 5.0
For 3.x installations refer to the 1.x version
Installation
Install the module through composer:
composer require g4b0/htmlpurifier
composer update
Usage
Whenever you need to purify your HTML code, eg. during OnBeforeWrite, OnAfterWrite or in a custom search, just call the wrapper function:
$content = Purifier::PurifyTXT($p->Content); $content = Purifier::RemoveEmbed($content);
统计信息
- 总下载量: 6.28k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-only
- 更新时间: 2018-05-11