NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #211 most downloaded on Packagist
Provides an object-oriented API to sanitize untrusted HTML input for safe insertion into a document's DOM.
Latest stable
v8.1.11
Last release 16 days ago
06 Nov 2026
Release timing varies
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
105 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Changelog ( v8.2.0-BETA1...v8.2.0-BETA2 )
Changelog (v8.2.0-BETA1...v8.2.0-BETA2)
html and body in allowSafeElements() and don't let links expose window.opener (@nicolas-grekas)link, meta, plaintext and referrerpolicy as safe (@nicolas-grekas)Changelog ( v8.1.11...v8.2.0-BETA1 )
Changelog (v8.1.11...v8.2.0-BETA1)
allowSafeElements() and allowStaticElements() (@nicolas-grekas)Your coding agent can read these notes before it upgrades. Set up the MCP server →
security #cve-2026-118517 Require special schemes and scheme-relative URLs to carry a non-empty authority ( @nicolas-grekas )
Changelog (v8.1.10...v8.1.11)
[SECURITY] Security release
bug #67227 Don't cut a multibyte character when truncating the input to its maximum length ( @nicolas-grekas )
Changelog (v8.1.8...v8.1.10)
[SECURITY] Security release
bug #66394 Don't render comments as elements when the default action is Allow ( @nicolas-grekas )
Changelog (v8.1.7...v8.1.8)
Allow (@nicolas-grekas)sanitizeFor() with table-related, image and plaintext contexts (@nicolas-grekas)bug #65843 Drop relative URLs whose first path segment contains a colon instead of throwing (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.1.6...v8.1.7)
bug #65702 Compare schemes and hosts case-insensitively (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.1.1...v8.1.6)
minor #64524 Make tests compatible with PHPUnit 13.2 and Twig 3.28 (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.1.0...v8.1.1)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.1.0-RC1...v8.1.0) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.1.0-RC1...v8.1.0)
security #cve-2026-48761 Sanitize URL attributes on , , , , and the URL inside content (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.1.0-BETA3...v8.1.0-RC1)
security #cve-2026-45753 Sanitize URLs in action, formaction, poster and cite attributes (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.1.0-BETA1...v8.1.0-BETA3)
allowLinkHosts/allowMediaHosts bypass via URL parser differentials and <area> misclassification (@alexandre-daubois)security #cve-2026-48761 Sanitize URL attributes on , , , , and the URL inside content (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.13...v8.1.0-BETA1)
allowLinkHosts/allowMediaHosts bypass via URL parser differentials and <area> misclassification (@alexandre-daubois)minor #64524 Make tests compatible with PHPUnit 13.2 and Twig 3.28 (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.13...v8.0.14)
security #cve-2026-48761 Sanitize URL attributes on , , , , and the URL inside content (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.12...v8.0.13)
security #cve-2026-45753 Sanitize URLs in action, formaction, poster and cite attributes (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.7...v8.0.12)
allowLinkHosts/allowMediaHosts bypass via URL parser differentials and <area> misclassification (@alexandre-daubois)Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.7...v8.0.8) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.7...v8.0.8)
bug #63598 Add 'sms' to hostless schemes (@hivokas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.6...v8.0.7)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.0-RC3...v8.0.0) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.0-RC3...v8.0.0)
MastermindsParser; use NativeParser instead$context to ParserInterface::parse()Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.0-BETA2...v8.0.0-RC1) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.0-BETA2...v8.0.0-RC1)
bug symfony/symfony#62201 [HtmlSanitizer] Remove srcdoc from allowed attributes (@Spomky)
Changelog (https://github.com/symfony/html-sanitizer/compare/v8.0.0-BETA1...v8.0.0-BETA2)
srcdoc from allowed attributes (@Spomky)feature symfony/symfony#61391 [HtmlSanitizer] Remove MastermindsParser and add $context arg to ParserInterface::parse() (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.4...v8.0.0-BETA1)
security #cve-2026-118517 Require special schemes and scheme-relative URLs to carry a non-empty authority ( @nicolas-grekas )
Changelog (v7.4.22...v7.4.23)
[SECURITY] Security release
Changelog ( v7.4.20...v7.4.22 )
Changelog (v7.4.20...v7.4.22)
[SECURITY] Security release
Changelog ( v7.4.19...v7.4.20 )
Changelog (v7.4.19...v7.4.20)
Allow (@nicolas-grekas)sanitizeFor() with table-related, image and plaintext contexts (@nicolas-grekas)bug #65843 Drop relative URLs whose first path segment contains a colon instead of throwing (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.18...v7.4.19)
bug #65702 Compare schemes and hosts case-insensitively (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.14...v7.4.18)
minor #64524 Make tests compatible with PHPUnit 13.2 and Twig 3.28 (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.13...v7.4.14)
security #cve-2026-48761 Sanitize URL attributes on , , , , and the URL inside content (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.12...v7.4.13)
security #cve-2026-45753 Sanitize URLs in action, formaction, poster and cite attributes (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.7...v7.4.12)
allowLinkHosts/allowMediaHosts bypass via URL parser differentials and <area> misclassification (@alexandre-daubois)Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.7...v7.4.8) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.7...v7.4.8)
bug #63598 Add 'sms' to hostless schemes (@hivokas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.6...v7.4.7)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.0-RC3...v7.4.0) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.0-RC3...v7.4.0)
MastermindsParser; use NativeParser insteadParserInterface::parse() can now return \Dom\Node|\DOMNode|null instead of just \DOMNode|null$context to ParserInterface::parse()Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.0-BETA2...v7.4.0-RC1) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.0-BETA2...v7.4.0-RC1)
bug symfony/symfony#62201 [HtmlSanitizer] Remove srcdoc from allowed attributes (@Spomky)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.4.0-BETA1...v7.4.0-BETA2)
srcdoc from allowed attributes (@Spomky)feature symfony/symfony#61366 [HtmlSanitizer] Use the native HTML5 parser when using PHP 8.4+ (@nicolas-grekas)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.4...v7.4.0-BETA1)
bug symfony/symfony#62201 [HtmlSanitizer] Remove srcdoc from allowed attributes (@Spomky)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.5...v7.3.6)
srcdoc from allowed attributes (@Spomky)bug symfony/symfony#58547 [HtmlSanitizer] Fix force_attributes not replacing existing attribute in initial data (@tgalopin)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.2...v7.3.3)
force_attributes not replacing existing attribute in initial data (@tgalopin)Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.1...v7.3.2) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.1...v7.3.2)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.0-RC1...v7.3.0) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.0-RC1...v7.3.0)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.0-BETA2...v7.3.0-RC1) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.3.0-BETA2...v7.3.0-RC1)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.6...v7.3.0-BETA1) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.6...v7.3.0-BETA1)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.8...v7.2.9) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.8...v7.2.9)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.5...v7.2.6) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.5...v7.2.6)
bug symfony/symfony#59525 [HtmlSanitizer] Fix access to undefined keys in UrlSanitizer (Antoine Beyet)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.2...v7.2.3)
bug symfony/symfony#59321 [HtmlSanitizer] reject URLs containing whitespaces (@xabbuh)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.1...v7.2.2)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.0-RC1...v7.2.0) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.0-RC1...v7.2.0)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.0-BETA2...v7.2.0-RC1) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.2.0-BETA2...v7.2.0-RC1)
feature symfony/symfony#57399 [HtmlSanitizer] Add support for configuring the default action (@Seldaek)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.6...v7.2.0-BETA1)
bug symfony/symfony#59525 [HtmlSanitizer] Fix access to undefined keys in UrlSanitizer (Antoine Beyet)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.10...v7.1.11)
bug symfony/symfony#59321 [HtmlSanitizer] reject URLs containing whitespaces (@xabbuh)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.9...v7.1.10)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.5...v7.1.6) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.5...v7.1.6)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.4...v7.1.5) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.4...v7.1.5)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.0...v7.1.1) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.0...v7.1.1)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.0-RC1...v7.1.0) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.0-RC1...v7.1.0)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.0-BETA1...v7.1.0-RC1) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.1.0-BETA1...v7.1.0-RC1)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.0.7...v7.1.0-BETA1) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.0.7...v7.1.0-BETA1)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.0.7...v7.0.8) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.0.7...v7.0.8)
bug symfony/symfony#54513 [HtmlSanitizer] Ignore Processing Instructions (@smnandre)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.0.6...v7.0.7)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.0.3...v7.0.4) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.0.3...v7.0.4)
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.0.2...v7.0.3) * no significant changes
Changelog (https://github.com/symfony/html-sanitizer/compare/v7.0.2...v7.0.3)
One column per quarter.