smorken/sanitizer
Sanitizer for Laravel and PHP applications that cleans untrusted input and output, stripping unsafe HTML and helping prevent XSS. Configurable filters make it easy to define allowed tags and attributes for safe, consistent data handling.
Consider it only when most of these are true:
Sanitizer interface so it can be replaced by HTMLPurifier, Symfony HtmlSanitizer, DOMPurify on the frontend, or custom validation later.Look elsewhere when:
Executive summary: This is a small Laravel sanitizer helper that can speed up basic input-cleaning work, but it is not a proven or widely adopted dependency. Use it as a tactical reference or prototype aid—not as a critical security component—unless engineering audits and owns it. The product upside is faster delivery of safer UGC/form features; the risk is supply-chain and maintenance exposure.
For engineering: Evaluate the code size, test coverage, Laravel/PHP compatibility, and maintenance status. If adopted, wrap it behind an internal sanitization interface, pin the version or vendor it, add tests for allowed tags and edge cases, and define a replacement path. Prefer established sanitizers for public-facing or compliance-relevant surfaces.
Recommendation: Treat smorken/sanitizer as a low-cost pattern to borrow from or a short-term internal utility. Do not make it a strategic dependency without audit and ownership. Use the evaluation to decide sanitization policy, not to outsource security.
How can I help you explore Laravel packages today?