gvlatko / laravel-xss
Installs: 369
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 5
Forks: 11
Open Issues: 2
Requires
- php: >=5.3.0
- illuminate/support: 4.0.x
This package is not auto-updated.
Last update: 2024-11-19 06:03:14 UTC
README
A port of CodeIgniter Security Library to Laravel for XSS prevention
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
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);