FindSoftware

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

Current major version
48
Last release
2026-09-158

Adoption

GitHub stars
3,3491
Packagist downloads
398,363,6044
Contributors
959
Dependent repositories
36,5675
Dependent packages
4175

Why these figures do not compare

Sources

  1. 2026-11-09: links, Written in, License, GitHub stars
    api.github.com/repos/ezyang/htmlpurifier
  2. 2026-11-09: links, Categories, Install with
    github.com/ezyang/htmlpurifier/blob/master/README.md
  3. 2026-11-09: Maintainer, Runtime, Minimum runtime
    github.com/ezyang/htmlpurifier/blob/v4.19.1/composer.json
  4. 2026-11-09: Packagist downloads
    packagist.org/packages/ezyang/htmlpurifier.json
  5. 2026-11-09: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/packagist.org/packages/ezyang%2Fhtmlpurifier
  6. 2026-11-09: First release
    api.github.com/repos/ezyang/htmlpurifier/git/commits/725a8cb4a4a9d0788c54c60097c6d097d6cb29af
  7. 2026-11-09: License model
    raw.githubusercontent.com/ezyang/htmlpurifier/master/LICENSE
  8. 2026-11-09: Current major version, Last release
    api.github.com/repos/ezyang/htmlpurifier/releases
  9. 2026-11-09: Contributors
    api.github.com/repos/ezyang/htmlpurifier/contributors?per_page=1

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON