Download the PHP package jizuscreed/white-html-filter without Composer
On this page you can find all versions of the php package jizuscreed/white-html-filter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jizuscreed/white-html-filter
More information about jizuscreed/white-html-filter
Files in jizuscreed/white-html-filter
Package white-html-filter
Short Description A lightweight php-based HTML tag and attribute whitelist filter. Fork of lincanbin/white-html-filter with three critical bugfixes
License Apache-2.0
Informations about the package white-html-filter
White HTML Filter 
A php-based HTML tag and attribute whitelist filter.
XSS filtering based on regular or textual replacement is not safe. This filter uses the DOMDocument based on The Tokenization Algorithm
, which is more secure.
Requirements
- PHP version 5.3.0 or higher.
Installation
Install this package via Composer.
Or edit your project's composer.json
to require lincanbin/white-html-filter
and then run composer update
.
Usage
Basic Usage
Note: You should have composer's autoloader included
require 'vendor/autoload.php'
(that's obvious.)
Instantiate WhiteHTMLFilter object
Configuration
-
Remove allowed tags
-
Add new allowed tags
-
Modify allowed HTML global attributes
-
Modify allowed css style (Leave blank to allow everything)
- Modify allowed css class (Leave blank to allow everything)
Use Custom Attribute Value Filter
Result:
Default Filter Configuration
Donate for White HTML Filter
- Alipay:
- Wechat:
-
Paypal: