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
Html Sanitizer

Html Sanitizer Laravel Package

symfony/html-sanitizer

Object-oriented HTML sanitizer for PHP/Symfony. Safely cleans untrusted HTML for DOM insertion with configurable allow/block/drop rules, attribute policies, forced values, and URL controls (HTTPS and scheme/host allowlists). Removes scripts and unsafe behaviors.

View on GitHub
Deep Wiki
Context7

Symfony’s HtmlSanitizer component provides an object-oriented API to sanitize untrusted HTML before inserting it into the DOM. It helps prevent common XSS vectors by allowing you to define a clear policy for which elements, attributes, and URL schemes are permitted.

Build a reusable HtmlSanitizerConfig that can allow, block, or drop specific tags and attributes, enforce safer defaults, and normalize links for consistent output.

  • Allow safe/static elements while stripping scripts and unsafe behaviors
  • Fine-grained rules to allow/block/drop elements (with or without children)
  • Control attributes: allow/drop/force values per element or globally
  • Enforce link safety with HTTPS forcing and scheme/host whitelists
  • Standards-aligned defaults via the W3C Sanitizer API configuration
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