Skip to content

ceejayoz/Purifier

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTMLPurifier for Laravel 4

A simple Laravel 4 service provider for including the HTMLPurifier for Laravel 4.

Installation

The HTMLPurifier Service Provider can be installed via Composer by requiring the mews/purifier package and setting the minimum-stability to dev (required for Laravel 4) in your project's composer.json.

{
    "require": {
        "laravel/framework": "4.0.*",
        "mews/purifier": "dev-master"
    },
    "minimum-stability": "dev"
}

Update your packages with composer update or install with composer install.

Usage

To use the HTMLPurifier Service Provider, you must register the provider when bootstrapping your Laravel application. There are essentially two ways to do this.

Find the providers key in app/config/app.php and register the HTMLPurifier Service Provider.

    'providers' => array(
        // ...
        'Mews\Purifier\PurifierServiceProvider',
    )

Find the aliases key in app/config/app.php.

    'aliases' => array(
        // ...
        'Purifier' => 'Mews\Purifier\Facades\Purifier',
    )

Example

    Purifier::clean(Input::get('inputname'));

^_^

Links

About

HTMLPurifier for Laravel 4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%