descriptionStandards-compliant HTML filter written in PHP
homepage URL
last changeMon, 13 Mar 2017 06:30:53 +0000 (12 23:30 -0700)
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-03-13 Edward Z. YangRelease 4.9.2masterv4.9.2
2017-03-13 Edward Z. YangAdd tests for new entity decoding codepath.
2017-03-13 Edward Z. YangNEWS for 4.9.2
2017-03-12 Edward Z. YangMerge pull request #129 from rybakit/patch-1
2017-03-12 Eugene LeonovichFix a call to undefined function HTMLPurifier_Encoder()
2017-03-09 Edward Z. YangFix more PHP 5.3 problems.
2017-03-09 Edward Z. YangTurn on 5.3 Travis testing.
2017-03-09 Edward Z. YangFix PHP 5.3 compatibility, fixes #125.
2017-03-08 Edward Z. YangEnable PHP 7.1 testing.
2017-03-08 Edward Z. YangRelease 4.9.1 (sic)v4.9.1
2017-03-08 Edward Z. YangAdd test case for removing empty list items.
2017-03-08 Edward Z. YangFix #83.
2017-03-08 Edward Z. YangRevamp entity decoding to be more like HTML5.
2017-03-07 Edward Z. YangComment on why it's a non-greedy match.
2017-03-07 Edward Z. YangTest for catastrophic backtracking.
2017-03-07 Edward Z. YangUsage/includes update.
2 weeks ago v4.9.2 HTML Purifier 4.9.2
2 weeks ago v4.9.1 HTML Purifier 4.9.1
8 months ago v4.8.0 HTML Purifier 4.8.0
8 months ago 4.8.0 HTML Purifier 4.8.0
19 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
6 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
2 weeks ago master
8 months ago travis
6 years ago customize-raw
7 years ago hiphop
8 years ago objects
Cached version (398s old)
htmlpurifier/rdancer.git Lightweight fork of HTML Purifier 4 years ago
htmlpurifier/bfroehle.git HTMLPurifier with iframe extension 5 years ago