descriptionStandards-compliant HTML filter written in PHP
homepage URL
last changeThu, 19 Jan 2017 17:28:40 +0000 (19 09:28 -0800)
content tags

HTML Purifier Build Status

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.

HTML Purifier is oriented towards richly formatted documents from untrusted sources that require CSS and a full tag-set. This library can be configured to accept a more restrictive set of tags, but it won't be as efficient as more bare-bones parsers. It will, however, do the job right, which may be more important.

Places to go:

HTML Purifier can be found on the web at:


Package available on Composer.

If you're using Composer to manage dependencies, you can use

$ composer require "ezyang/htmlpurifier": "dev-master"
2017-01-19 Edward Z. Yangexport-ignore .travis.ymlmaster
2017-01-04 Edward Z. YangRemove $a = array($a) which is miscompiled by Zend...
2016-10-29 Edward Z. YangHandle semicolons in strings in CSS correctly.
2016-10-28 Edward Z. YangAdd missing changelog entries.
2016-10-28 Edward Z. YangAllow %URI.DefaultScheme to be null.
2016-10-27 Edward Z. Yang[ci skip] Add a Travis build badge.
2016-10-27 Edward Z. YangTravis support.
2016-10-27 Edward Z. YangUpdate usage.xml.
2016-10-27 Edward Z. YangHandle case when IDNAs are supported.
2016-10-27 Edward Z. YangPHP 7.0 warnings fix: don't pass rvalue by reference.
2016-10-27 Edward Z. YangDon't assume that idn_to_ascii does validation.
2016-10-16 Edward Z. YangMerge pull request #101 from yankos/hotfix/directory_no...
2016-10-15 yan_kosFIX directory not closing
2016-10-02 Edward Z. YangDelete asserts, fixes #97.
2016-09-05 Edward Z. YangProposed fix to Serializer code.
2016-09-05 Edward Z. YangMerge pull request #94 from zobzn/css-min-max-width
7 months ago v4.8.0 HTML Purifier 4.8.0
7 months ago 4.8.0 HTML Purifier 4.8.0
18 months ago v4.7.0 HTML Purifier 4.7.0
3 years ago v4.6.0 HTML Purifier 4.6.0
3 years ago gusev
4 years ago v4.5.0 HTML Purifier 4.5.0
5 years ago v4.4.0 HTML Purifier 4.4.0
5 years ago v4.3.0 HTML Purifier 4.3.0
6 years ago v4.2.0 HTML Purifier 4.2.0
6 years ago v4.1.1 HTML Purifier v4.1.1
6 years ago v4.1.0 HTML Purifier v4.1.0
7 years ago v4.0.0 HTML Purifier 4.0.0
8 years ago v3.3.0 HTML Purifier 3.3.0
8 years ago v3.2.0 HTML Purifier 3.2.0
8 years ago v3.1.1.2 v3.1.1.2 actually works, but includ...
8 years ago v3.1.1.1 Tag v3.1.1.1, functionally the...
5 weeks ago master
7 months ago travis
6 years ago customize-raw
6 years ago hiphop
8 years ago objects
Cached version (5494s old)
htmlpurifier/rdancer.git Lightweight fork of HTML Purifier 4 years ago
htmlpurifier/bfroehle.git HTMLPurifier with iframe extension 5 years ago