PHPackages                             sneek/laravel-xss-middleware - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. sneek/laravel-xss-middleware

ActiveLibrary[Security](/categories/security)

sneek/laravel-xss-middleware
============================

Simple Laravel XSS middlware to strip all tags and encode all entities from a user

1.1.0(8y ago)23.6kGPL-3.0PHPPHP &gt;=5.4

Since Aug 14Pushed 8y ago3 watchersCompare

[ Source](https://github.com/Sneek/laravel-xss-middleware)[ Packagist](https://packagist.org/packages/sneek/laravel-xss-middleware)[ RSS](/packages/sneek-laravel-xss-middleware/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

XSS Middleware
==============

[](#xss-middleware)

A simple middleware for use in Laravel projects.

#### Installation

[](#installation)

Clone the repository

```
composer require sneek/laravel-xss-middleware
```

Add to the Http kernel `App\Http\Kernel`

```
    /**
     * The application's route middleware groups.
     *
     * @var array
     */
    protected $middlewareGroups = [
        'web' => [
            ...
            \Sneek\Http\Middleware\XSSProtection::class,
        ],
    ....
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~55 days

Total

2

Last Release

3186d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1101167?v=4)[Cristian Giordano](/maintainers/CristianGiordano)[@CristianGiordano](https://github.com/CristianGiordano)

---

Tags

middlewarelaravelxss

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sneek-laravel-xss-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/sneek-laravel-xss-middleware/health.svg)](https://phpackages.com/packages/sneek-laravel-xss-middleware)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[masterro/laravel-xss-filter

Filter user input for XSS but don't touch other html

41266.1k](/packages/masterro-laravel-xss-filter)[stevenmaguire/laravel-middleware-csp

Provides support for enforcing Content Security Policy with headers in Laravel responses.

39107.6k](/packages/stevenmaguire-laravel-middleware-csp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
