Package Data | |
---|---|
Maintainer Username: | gvlatko |
Maintainer Contact: | vlatko@g6solutions.com (Vlatko Gjurgjinoski) |
Package Create Date: | 2013-09-20 |
Package Last Update: | 2013-10-25 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-22 03:09:19 |
Package Statistics | |
---|---|
Total Downloads: | 369 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 17 |
Total Watchers: | 5 |
Total Forks: | 11 |
Total Open Issues: | 2 |
A port of CodeIgniter Security Library to Laravel for XSS prevention
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'
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);