NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1070 most downloaded on Packagist
HTML sanitizer aiming to provide XSS-safe markup based on explicitly allowed tags, attributes and values.
Latest stable
v2.3.2
Last release 5 months ago
08 Jun 2026
Release timing varies
gaps range from 3 weeks to 1.8 years
Most releases are documented
notes for 32 of 38 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
38 releases · first in 2021
Drag across the ruler to compare, or tap a release to open it.
[SECURITY] Mitigate raw-text bypass with ALLOW_INSECURE_RAW_TEXT by @ohader in #128
Full Changelog: v2.3.1...v2.3.2
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.3.1...v2.3.2
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Revert "[!!!][TASK] Remove deprecated CommonBuilder->srcsetAttr ( #119 )" by @ohader in #126
Full Changelog: v2.3.0...v2.3.1
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.3.0...v2.3.1
[!!!][TASK] Remove deprecated CommonBuilder->srcsetAttr by @lolli42 in #119
Full Changelog: v2.2.0...v2.3.0
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.2.0...v2.3.0
PHP 8.4 compatibility by @lolli42 in #117
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.1.4...v2.2.0
[TASK] Disable test for unicode non breaking spaces substitution by @ohader in #112
Full Changelog: v2.1.3...v2.1.4
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.1.3...v2.1.4
[TASK] Drop replacement of unicode non breaking spaces by @bnf in #110
Full Changelog: v2.1.2...v2.1.3
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.1.2...v2.1.3
Sanitizer constructor documents array instead of spread by @dpi in #108
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.1.1...v2.1.2
[TASK] CI: Remove workaround for phpspec/prophecy and PHP 8.2 by @andreasfernandez in https://github.com/TYPO3/html-sanitizer/pull/104
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.1.0...v2.1.1
[TASK] Postpone Sanitizer deprecations by @ohader in https://github.com/TYPO3/html-sanitizer/pull/100
Behavior\EmptyAttrValue by @ohader in https://github.com/TYPO3/html-sanitizer/pull/88$node to $domNode by @ohader in https://github.com/TYPO3/html-sanitizer/pull/90\TYPO3\HtmlSanitizer\Sanitizer by @ohader in https://github.com/TYPO3/html-sanitizer/pull/97Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.0.16...v2.1.0
[TASK] Allow CI for any branch, add schedule, add badge by @lolli42 in https://github.com/TYPO3/html-sanitizer/pull/84
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.0.15...v2.0.16
[TASK] add img attr. fetchPriority by @xerc in https://github.com/TYPO3/html-sanitizer/pull/81
img attr. fetchPriority by @xerc in https://github.com/TYPO3/html-sanitizer/pull/81track attr. srclang by @xerc in https://github.com/TYPO3/html-sanitizer/pull/80Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.0.14...v2.0.15
[TASK] Run tests with PHP 8.1 by @lolli42 in https://github.com/TYPO3/html-sanitizer/pull/67
[TASK] Run tests with PHP 8.1 by @lolli42 in https://github.com/TYPO3/html-sanitizer/pull/67[TASK] Let test suite fail with E_ALL by @lolli42 in https://github.com/TYPO3/html-sanitizer/pull/68[TASK] Ensure error_reporting uses E_ALL by @ohader in https://github.com/TYPO3/html-sanitizer/pull/72[BUGFIX] Purge node only having empty text nodes by @ohader in https://github.com/TYPO3/html-sanitizer/pull/73[TASK] Allow installation of any PSR-Log version. by @Crell in https://github.com/TYPO3/html-sanitizer/pull/78Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.0.13...v2.0.14
836ee82 [!!!][TASK] Change attr value verification to take first match → see PR #66
836ee82 [!!!][TASK] Change attr value verification to take first match → see PR #66
db5844b [TASK] Allow deprecated center and strike tag
db5844b [TASK] Allow deprecated center and strike tag
2d6f518 [TASK] Allow more URI schemes for href attribute 8d8097f [TASK] Add immutable behavior to Behavior\Attr d8bcac6 [FEATURE] Allow data URI for m
2d6f518 [TASK] Allow more URI schemes for href attribute
8d8097f [TASK] Add immutable behavior to Behavior\Attr
d8bcac6 [FEATURE] Allow data URI for media types
2828be4 [TASK] Introduce UriAttrValueBuilder
b0322ad [TASK] Allow ol and li attributes
7a74225 [TASK] Allow RFC 2392 compliant URI schemes
b205c1e [TASK] Add Behavior\Attr tests
fb33578 [TASK] Allow font tag (deprecated)
[TASK] Adjust PHPDoc comments & code clean-up[TASK] Adjust internal variable names[TASK] Allow font tag (deprecated)5dfd055 [TASK] Adjust README.md
[TASK] Adjust README.md[TASK] Extend README.md[TASK] Allow using microdata meta data[TASK] Extend image tag attributes[TASK] Replace overlint with native linting8df823e [TASK] Add test cases for media related tags/attrs
[TASK] Add test cases for media related tags/attrs[TASK] Add img.loading attribute[TASK] Allow figure tag and necessary attributes in source tag[FEATURE] Forward sanitization initiator to logging[TASK] Separate <table> declarations in own method[TASK] Streamline media tag declarations[BUGFIX] Add missing <table> related attributesc5f1e2e [TASK] Add support for tel: in link href attribute
[TASK] Add support for tel: in link href attribute97e480e [TASK] Remove superfluous a.media attribute
[TASK] Remove superfluous a.media attribute[BUGFIX] Extend A element with legacy attributesae00ea9 [BUGFIX] Drop using preg_last_error_msg
[BUGFIX] Drop using preg_last_error_msg[BUGFIX] Traverse child nodes in reverse order to allow modificationsNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
[TASK] Disable test for unicode non breaking spaces substitution by @ohader in #113
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v1.5.2...v1.5.3
[TASK] Drop replacement of unicode non breaking spaces by @bnf in #111
Full Changelog: v1.5.1...v1.5.2
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v1.5.1...v1.5.2
[SECURITY] Properly encode noscript child nodes by @ohader & @bnf in 090fb6d
Full Changelog: v1.5.0...v1.5.1
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v1.5.0...v1.5.1
[TASK] Backport library to support PHP 7.0 and 7.1 by @andreasfernandez in https://github.com/TYPO3/html-sanitizer/pull/103
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v2.1.0...v1.5.0
[TASK] Add Behavior\Attr tests by @ohader in https://github.com/TYPO3/html-sanitizer/pull/54
Full Changelog: https://github.com/TYPO3/html-sanitizer/compare/v1.0.6...v1.0.7
7ea2bbd [TASK] Allow font tag (deprecated)
[TASK] Adjust PHPDoc comments & code clean-up[TASK] Adjust internal variable names[TASK] Allow font tag (deprecated)df5838f [TASK] Adjust README.md
[TASK] Adjust README.md[TASK] Extend README.md[TASK] Allow using microdata meta data[TASK] Extend image tag attributes84e31bc [TASK] Replace overlint with native linting
[TASK] Replace overlint with native linting[BUGFIX] Remove PHP 7 slip-thru1ca48eb [TASK] Allow figure tag and necessary attributes in source tag
[TASK] Allow figure tag and necessary attributes in source tag[FEATURE] Forward sanitization initiator to logging[BUGFIX] Add missing <table> related attributes3beafe7 [TASK] Add support for tel: in link href attribute
[TASK] Add support for tel: in link href attribute357f9d3 [BUGFIX] Extend A element with legacy attributes
[BUGFIX] Extend A element with legacy attributesNothing published for this version
One column per quarter.