FindSoftware

Symfony HtmlSanitizer

PHP component with an object-oriented API for sanitizing untrusted HTML input before it is inserted into a document.

Symfony HtmlSanitizer is a PHP component that cleans untrusted HTML before it is inserted into a document. It rebuilds the markup from the elements and attributes a configuration allows, and its docs give output from WYSIWYG editors as an example of untrusted input. It is based on the W3C HTML Sanitizer standard proposal.

The Symfony framework exposes the sanitizer as a service. It integrates with Symfony Forms through an option on text fields, and the docs show a Twig filter and a standalone use.

The repository is a read-only split of the main Symfony repository, which takes the issues and pull requests.

Identity

Status
Active
Maintainer
Fabien Potencier5
First release
20226

Rendering and deploy

Install with
composer3

Releases

Current major version
87
Last release
2026-11-048

Adoption

GitHub stars
2852
Packagist downloads
71,420,2249
Contributors
2510
Packagist downloads a month
9,744,6629
Dependent repositories
1,15011
Dependent packages
2911

Why these figures do not compare

Sources

  1. 2026-11-16: links, Categories
    symfony.com/packages/html-sanitizer
  2. 2026-11-16: links, Written in, License, GitHub stars
    api.github.com/repos/symfony/html-sanitizer
  3. 2026-11-16: links, Install with
    symfony.com/doc/current/html_sanitizer.html
  4. 2026-11-16: Runtime, Minimum runtime
    github.com/symfony/html-sanitizer/blob/v8.1.11/composer.json
  5. 2026-11-16: Maintainer
    github.com/symfony/html-sanitizer/blob/8.2/LICENSE
  6. 2026-11-16: First release
    repo.packagist.org/p2/symfony/html-sanitizer.json
  7. 2026-11-16: Current major version
    github.com/symfony/html-sanitizer/releases
  8. 2026-11-16: Last release
    api.github.com/repos/symfony/html-sanitizer/releases
  9. 2026-11-16: Packagist downloads, Packagist downloads a month
    packagist.org/packages/symfony/html-sanitizer.json
  10. 2026-11-16: Contributors
    api.github.com/repos/symfony/html-sanitizer/contributors
  11. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/packagist.org/packages/symfony/html-sanitizer

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