Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Dom Sanitizer Laravel Package

rhukster/dom-sanitizer

PHP 7.3+ DOM/SVG/MathML sanitizer using DOMDocument and DOMPurify-based allowlists. Removes dangerous tags/attributes, with options for namespace/PHP/HTML/XML stripping and output compression. Customize allowed/disallowed tags and attributes.

View on GitHub
Deep Wiki
Context7
1.0.9

Security & Bug Fixes

Security

  • Fixed SVG sanitizer bypass via ASCII whitespace entities (https://github.com/rhukster/dom-sanitizer/issues/6) — Addresses a bypass of the CVE-2026-33172 fix where character entities like (tab), (newline), and (CR) could be used to smuggle javascript: URIs past the regex-based sanitization. The fix adds DOM-level URL scheme validation that operates on decoded attribute values, eliminating this entire class of entity-encoding bypasses.
  • Added comprehensive XSS event handler tests for GHSA-gxwg-x2jg-q44j to improve test coverage of onload, onclick, onerror, onmouseover, and other event handler stripping across SVG and HTML contexts.
  • Added SECURITY.md with instructions for private vulnerability reporting.

Bug Fixes

  • Fixed SVG filter elements being incorrectly removed (https://github.com/rhukster/dom-sanitizer/issues/5) — SVG filter tags (feGaussianBlur, feBlend, feColorMatrix, etc.) were defined in camelCase but compared against lowercased tag names, causing all filter elements to be silently stripped during sanitization.
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport