tgalopin/html-sanitizer-bundle
Symfony bundle integrating the html-sanitizer library so you can define and configure HTML sanitizers as services, clean untrusted markup safely, and use customizable sanitizer profiles throughout your application.
details extension directly expands the set of safe, permitted markup — enabling <details>/<summary> collapsible blocks, which is a recurring product request for FAQ, changelog, and long-form content surfaces.key means sanitizer profiles/extensions can now be toggled per environment. That supports a concrete decision: ship new markup permissions (like the details extension) dark in staging, validate rendering and downstream consumers (search indexing, email digests, RSS, mobile clients), then enable in production without a code deploy.Important scoping note: this release is for tgalopin/html-sanitizer-bundle, a Symfony bundle, not a Laravel package. If the intent is Laravel adoption, the correct artifact is the underlying tgalopin/html-sanitizer library consumed directly (or via a thin Laravel service-provider/config wrapper we own). The PM decision differs accordingly: do not plan to install this bundle in a Laravel app. Treat this assessment as coverage of the sanitizer ecosystem we depend on, and as an early-warning signal for the underlying library's direction.
Adopt (the sanitizer library directly, or this bundle if we are on Symfony) when:
<details>).comment, article, email_preview) so different surfaces can permit different markup without duplicated config.Look elsewhere when:
For executives: We rely on a small, well-scoped open-source component to clean user-submitted HTML before it reaches other users. The latest version (1.4.0) is a low-risk, additive release: it (a) lets us safely support a new formatting capability — collapsible <details> sections — that has been requested for long-form content, (b) adds compatibility with Symfony 6 so we aren't stranded on an unsupported framework version, and (c) fixes two small hygiene issues. There are no breaking changes, so upgrade cost is minimal and there is no user-facing risk. One clarification worth knowing: this particular package is a Symfony bundle; if we proceed on Laravel, the equivalent work is a thin internal wrapper around the underlying sanitizer library — a small, contained engineering task, not a new vendor relationship.
For engineering: Non-breaking minor. Two items of substance: the details extension must be registered explicitly per profile, so enabling it is a deliberate config change — roll it out behind the env-based key override (also fixed in this release) and verify downstream consumers (search indexing, feeds, email rendering, mobile webviews) tolerate the new tags. Framework support moves to Symfony 6; confirm our PHP version and any transitive Symfony constraints before bumping. The return-type fix clears a deprecation that would otherwise become noise or an error on a future PHP upgrade. Recommended action: upgrade in a low-traffic window, add <details>/<summary> to the sanitizer test fixtures, and confirm no consumer treats unknown tags as plain text. If the target application is Laravel, scope a wrapper around the standalone library instead of installing this bundle.
How can I help you explore Laravel packages today?