gvlatko/laravel-xss

There is no license information available for the latest version (dev-master) of this package.

dev-master 2013-10-25 18:18 UTC

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);