enshrined/svg-sanitize
PHP SVG/XML sanitizer inspired by DOMPurify. Clean untrusted SVGs with a simple sanitize() call, optional custom tag/attribute whitelists, remote reference stripping to prevent leaks, issue reporting, and output minification. Returns clean XML or false on parse errors.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| contao/imagine-svg | 0.83 | Imagine-compatible SVG image library for PHP/Contao. Open, crop, resize, and apply common effects (gamma, grayscale, blur, etc.) to SVGs and save results. Includes SVG-aware sizing via SvgBox for absolute, aspect-ratio, or undefined dimensions. | 86 | 86 | 9 | 62K | 1 | 5.6 | 39.4 | — | 1 year ago | |
| rhukster/dom-sanitizer | 0.81 | MIT-licensed PHP 7.3+ DOM/SVG/MathML sanitizer using DOMDocument and DOMPurify-based allowlists. Remove dangerous tags/attributes, strip namespaces and PHP/HTML/XML tags, and optionally compress output. Supports HTML, SVG, and MathML modes. | 11 | 11 | 4 | 169K | 0 | 19.1 | 62.7 | MIT | 2 months ago | |
| artack/svg-inline-bundle | 0.77 | — | 1 | 2 | 0 | 51 | 0 | 0.3 | 19.7 | MIT | 3 years ago | |
| voku/anti-xss | 0.77 | PHP AntiXSS library to sanitize untrusted HTML and prevent XSS attacks. Cleans input by removing dangerous tags/attributes, filters CSS/JS vectors, and supports UTF-8 and common encodings. Useful for safely handling user-generated content in apps. | 713 | 727 | 121 | 298K | 1 | 7.3 | 36.2 | MIT | — |
How can I help you explore Laravel packages today?