PHPackages                             owlgrin/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. owlgrin/xss

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

owlgrin/xss
===========

Xss Sanitizer for Laravel

0.1.1(9y ago)445.6k—5.9%1[3 issues](https://github.com/owlgrin/xss/issues)MITPHPPHP &gt;=5.3.0

Since Nov 13Pushed 9y ago3 watchersCompare

[ Source](https://github.com/owlgrin/xss)[ Packagist](https://packagist.org/packages/owlgrin/xss)[ RSS](/packages/owlgrin-xss/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel Xss
===========

[](#laravel-xss)

This package is the custom port of Codeigniter's Xss class.

### Installation

[](#installation)

Require the package in `composer.json`:

```
"owlgrin/xss": "0.1.*"
```

Then, include the following in the array on service providers in `config/app.php`:

```
'Owlgrin\Xss\XssServiceProvider',
```

And, if you want to use it as facade, bind the facade in facade's array in `config/app.php`:

```
'Xss'            => 'Owlgrin\Xss\XssFacade',
```

### Usage

[](#usage)

You can clean your input HTML code from Xss attacks using the `clean()` method:

```
