HTML Purifier
HTML filter library written in PHP that removes XSS attacks and makes the output standards-compliant HTML.
HTML Purifier is an HTML filter library written in PHP. It splits a document into tokens, removes elements and attributes that are not on its whitelist, and checks nesting and well-formedness, so the output is standards-compliant HTML. The author named in the package manifest is Edward Z. Yang.
Worth knowing
The project’s own site says the library “is not perfect; it can interact poorly with existing JavaScript on websites”.
Identity
- Status
- Active
- Maintainer
- Edward Z. Yang3
- Maintained by
- Individual
- First release
- 20066
Rendering and deploy
- Install with
- composer2
Releases
Adoption
Sources
- 2026-11-09: links, Written in, License, GitHub stars
api.github.com/repos/ezyang/htmlpurifier - 2026-11-09: links, Categories, Install with
github.com/ezyang/htmlpurifier/blob/master/README.md - 2026-11-09: Maintainer, Runtime, Minimum runtime
github.com/ezyang/htmlpurifier/blob/v4.19.1/composer.json - 2026-11-09: Packagist downloads
packagist.org/packages/ezyang/htmlpurifier.json - 2026-11-09: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/packagist.org/packages/ezyang%2Fhtmlpurifier - 2026-11-09: First release
api.github.com/repos/ezyang/htmlpurifier/git/commits/725a8cb4a4a9d0788c54c60097c6d097d6cb29af - 2026-11-09: License model
raw.githubusercontent.com/ezyang/htmlpurifier/master/LICENSE - 2026-11-09: Current major version, Last release
api.github.com/repos/ezyang/htmlpurifier/releases - 2026-11-09: Contributors
api.github.com/repos/ezyang/htmlpurifier/contributors?per_page=1