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

Sanitizer Laravel Package

aimeos/sanitizer

Laravel package providing data sanitization helpers: clean and normalize input, strip unwanted characters/tags, and validate common formats. Useful for securing request data and preparing values for storage, APIs, and user-facing output.

View on GitHub
Deep Wiki
Context7

Aimeos Sanitizer

Permissive sanitizer removing potentially dangerous content.

Installation

composer req aimeos/sanitizer

Usage

$input = '
    <svg><circle cx="50" cy="50" r="40" /></svg>
    <script>alert(1)</script>
    <a href="javascript:alert(2)" style="color:red;" onclick="alert(3)">Click me</a>
    <img src="data:image/png;base64,..." />
';
echo \Aimeos\Sanitizer\Sane::html( $input );

// Output: <a>Click me</a><img>

Specification

HTML

Removes these potential dangerous content:

  • Elements: 'embed', 'frame', 'iframe', 'object', 'script', 'svg'
  • Attributes: All that can execute code
  • URI schemes: 'javascript', 'data', 'vbscript', 'file', 'filesystem', 'blob'
  • IDs and names: Names used for global JS objects
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