2017 © Pedro Peláez
 

library laravel-purifier

HTML Purifier for Laravel 5

image

alexusmai/laravel-purifier

HTML Purifier for Laravel 5

  • Friday, March 16, 2018
  • by alexusmai
  • Repository
  • 2 Watchers
  • 1 Stars
  • 611 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 21 % Grown

The README.md

HTMLPurifier - Laravel 5 package

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

HTML Purifier is a standards-compliant HTML filter library written in PHP., (*2)

About HTML Purifier - http://htmlpurifier.org/, (*3)

Installation

Composer, (*4)

``` bash composer require alexusmai/laravel-purifier, (*5)


If you have Laravel 5.4 or earlier version, then add service provider to config/app.php and ``` php Alexusmai\LaravelPurifier\LaravelPurifierServiceProvider::class,

add alias., (*6)

``` php 'Purifier' => Alexusmai\LaravelPurifier\Facades\PurifierFacade::class,, (*7)


Publish config file (purifier.php) ``` php php artisan vendor:publish --provider="Alexusmai\LaravelPurifier\LaravelPurifierServiceProvider"

Usage

Use default settings (config/purifier.php - default), (*8)

// string
Purifier::clean($text);

// array
Purifier::clean(['text1', 'text2', 'text3']);

// or use helper function
purifier($text);

Or you can create your own settings in configuration file (config/purifier.php), (*9)

Purifier::clean($text, 'my-settings-name');

purifier($text, 'my-settings-name');

Or you can use dynamic configuration, (*10)

Purifier::clean($text, ['HTML.Allowed' => 'div,br,span']);

purifier($text, ['HTML.Allowed' => 'div,br,span']);

The Versions

16/03 2018

dev-master

9999999-dev

HTML Purifier for Laravel 5

  Sources   Download

MIT

The Requires

 

laravel purifier

16/03 2018

0.3

0.3.0.0

HTML Purifier for Laravel 5

  Sources   Download

MIT

The Requires

 

laravel purifier

20/09 2017

0.2

0.2.0.0

HTML Purifier for Laravel 5

  Sources   Download

MIT

The Requires

 

laravel purifier

07/02 2017

0.1

0.1.0.0

HTML Purifier for Laravel 5

  Sources   Download

MIT

The Requires

 

laravel purifier