joomla/filter
joomla/filter provides input and output filtering tools for PHP apps, helping sanitize content by allowing or blocking specific HTML tags and attributes. Includes OutputFilter helpers (e.g., URL-safe strings; optional Joomla\Language).
strip_tags().Adopt if:
e() or strip_tags().<b>, <i>, but block <script>) without managing a custom solution.Look elsewhere if:
Illuminate\Validation\Rules\Sanitize) for simple inputs.HTMLPurifier or DOMDocument), real-time filtering (WebSockets), or JavaScript integration.For Executives: "This package lets us deploy secure, configurable HTML sanitization in Laravel without building or maintaining custom XSS protection. It’s a drop-in solution for high-risk inputs like user comments or CMS content, reducing vulnerabilities while cutting development time. Joomla’s track record in security—despite low stars—makes it a pragmatic choice for core features. The tradeoff? Minimal maintenance risk vs. zero active development, but the security upside outweighs that for critical user inputs."
For Engineering:
*"The joomla/filter package provides battle-tested HTML sanitization for Laravel, with key benefits:
<script> but allow <a href>).Caveats:
Recommendation: Use for critical HTML inputs (e.g., comments, posts) where XSS is a priority, but combine with Laravel’s validation layer for non-HTML fields. Avoid for high-traffic APIs where performance is critical. Alternative: If Joomla-specific features aren’t needed, consider Laravel’s built-in escaping (e()) or HTMLPurifier for advanced use cases."*
For Security Teams: *"This package mitigates A03:2021 Injection (XSS) by providing:
<script>, javascript: URIs).', data: URIs, and common evasion characters (since v4.0.1).Mitigations for risks:
~4.0) to avoid breaking changes.e() for output escaping and CSRF tokens for forms.How can I help you explore Laravel packages today?