descriptionStandards-compliant HTML filter written in PHP
homepage URL
last changeFri, 23 Feb 2018 02:07:33 +0000 (22 21:07 -0500)
content tags

HTML Purifier Build Status

HTML Purifier is an HTML filtering solution that uses a unique combination of robust whitelists and aggressive 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"
2018-02-23 Edward Z. YangWhoops, forgot to edit WHATSNEWmaster
2018-02-23 Edward Z. YangRelease 4.10.0v4.10.0
2018-02-23 Edward Z. YangChangelog prep for release. (#167)
2017-12-30 John FlatnessSkip counting currentNesting if null
2017-12-30 John FlatnessQuarantine __autoload defs for PHP 7.2 compat
2017-12-23 Edward Z. YangDeal with old libxml incompatibilities.
2017-12-23 Jan DagefördeAdd relative length units from CSS 3
2017-12-23 Brad MostertFix spelling
2017-12-13 RobertoSmall typos in comments
2017-10-08 Edward Z. YangRemove PHP 5.3 support.
2017-10-03 Marina GlancyUse IDNA2008 for converting domains to ASCII
2017-06-24 Edward Z. YangMerge pull request #141 from pawelkania/master
2017-06-20 pawelkaniaFix E_WARNING when cache directory exists
2017-06-10 Edward Z. YangMerge pull request #139 from Edgars-Burtnieks/patch-1
2017-06-10 Edgars-BurtnieksUpdate
2017-06-03 Edward Z. YangRelease 4.9.3v4.9.3
2 years ago v4.10.0 HTML Purifier 4.10.0
3 years ago v4.9.3 HTML Purifier 4.9.3
3 years ago v4.9.2 HTML Purifier 4.9.2
3 years ago v4.9.1 HTML Purifier 4.9.1
3 years ago v4.8.0 HTML Purifier 4.8.0
3 years ago 4.8.0 HTML Purifier 4.8.0
4 years ago v4.7.0 HTML Purifier 4.7.0
6 years ago v4.6.0 HTML Purifier 4.6.0
6 years ago gusev
7 years ago v4.5.0 HTML Purifier 4.5.0
8 years ago v4.4.0 HTML Purifier 4.4.0
9 years ago v4.3.0 HTML Purifier 4.3.0
9 years ago v4.2.0 HTML Purifier 4.2.0
10 years ago v4.1.1 HTML Purifier v4.1.1
10 years ago v4.1.0 HTML Purifier v4.1.0
10 years ago v4.0.0 HTML Purifier 4.0.0
2 years ago master
3 years ago travis
9 years ago customize-raw
10 years ago hiphop
11 years ago objects
Cached version (2513s old)
htmlpurifier/darkodev.git Fixing PHP 7 reserved words in constant names 10 months ago
htmlpurifier/rdancer.git Lightweight fork of HTML Purifier 7 years ago
htmlpurifier/bfroehle.git HTMLPurifier with iframe extension 9 years ago