PHPackages                             gvlatko/laravel-xss - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. gvlatko/laravel-xss

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

gvlatko/laravel-xss
===================

1736910[2 issues](https://github.com/gvlatko/laravel-xss/issues)PHP

Since Oct 25Pushed 12y ago4 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-xss
===========

[](#laravel-xss)

A port of CodeIgniter Security Library to Laravel for XSS prevention

Installation
------------

[](#installation)

Include the package in your composer file

```
"require": {
    "gvlatko/laravel-xss": "dev-master"
}

```

Run composer update

Add the service provider in you app.php config file in the 'providers' array

```
'Gvlatko\LaravelXss\LaravelXssServiceProvider'

```

and add the alies also in the app.php config file in the 'aliases' array

```
'Xss'			  => 'Gvlatko\LaravelXss\LaravelXssFacade'

```

Usage
-----

[](#usage)

Use the Xss::clean($str, $is\_image = FALSE) to clean user input. For example:

```
$cleaned = Xss::clean(Input::get('comment');

```

or for use with images

```
$cleaned = Xss::clean(Input::file('profile'), TRUE);

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/231554?v=4)[gvlatko](/maintainers/gvlatko)[@gvlatko](https://github.com/gvlatko)

---

Top Contributors

[![gvlatko](https://avatars.githubusercontent.com/u/231554?v=4)](https://github.com/gvlatko "gvlatko (2 commits)")

### Embed Badge

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

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

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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