New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

frozennode/xssinput

A simple extension of the Laravel Input facade that mimics CodeIgniter's xss filtering
71,360 39

Larablocks Analysis

frozennode/xssinput works with Laravel 4 (latest release v1.0.0, Feb 11, 2014), which reached end of life: no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 4, past end of life
  • No release in the last 12 months (last: Feb 11, 2014)
  • 258 downloads a month (needs 10,000)
  • 39 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Feb 11, 2014.
  • No releases in the last 12 months.
  • First released: Feb 11, 2014.
  • Monthly downloads: 258, down 68% from six months ago.
  • 8 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.

Install
composer require frozennode/xssinput
Latest Version:v1.0.0
PHP:>=5.3.0
Laravel:4
License:MIT
Last Updated:Apr 30, 2015
Links: GitHub  ·  Packagist
Maintainer: janhartigan

XssInput for Laravel

XssInput is a screamingly simple extension of Laravel's Input facade that somewhat mimics the XSS filtering of CodeIgniter's input library. In fact, underneath the hood, this package uses an altered form of CodeIgniter's Security library to filter inputs for XSS.

XSS filtering happens in one of two ways: by setting the xss_filter_all_inputs option in this package's config to true, or by passing true as the third option to Input::get() or as the only option for Input::all().

Composer

To install XssInput as a Composer package to be used with Laravel 4, simply add this to your composer.json:

"frozennode/xssinput": "dev-master"

..and run composer update. Once it's installed, you can register the service provider in app/config/app.php in the providers array:

'providers' => array(
    'Frozennode\XssInput\XssInputServiceProvider',
)

..and change the Input alias to point to the facade for XssInput:

'aliases' => array(
	'Input' => 'Frozennode\XssInput\XssInput'
)

You could also, instead of doing this, give the XssInput facade a separate alias.

Then publish the config file with php artisan config:publish frozennode/xssinput. This will add the file app/config/packages/frozennode/xssinput/xssinput.php, which you should look at and understand because it's one option long.

Usage

It really is screamingly simple. If you've set the global xss filtering to true, then you can continue using the Input facade as you normally would:

Input::get('some_var');

The same goes for getting all inputs:

Input::all();

However, if you don't have global xss filtering on, you can pass in a third parameter to the get() method:

Input::get('some_var', null, true);

Or pass in true to the all() method:

Input::all(true);

If you have global filtering on, you can pass false in as these parameters to turn off filtering for that particular call to either method.

Related Packages

masterro/laravel-xss-filter

Filter user input for XSS but don't touch other html

307,536 41
sneek/laravel-xss-middleware

Simple Laravel XSS middlware to strip all tags and encode all entities from a us...

3,584 2
sloyakuza/laravel-html-purifier

An HTML Purifier for Laravel

1,784 0
crcms/filter

crcms input filter

1,107 0
mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

23,909,128 1,976

Version History

Version Released PHP Laravel License
v1.0.0 >=5.3.0 ~4 MIT