PHPackages                             alexusmai/laravel-purifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. alexusmai/laravel-purifier

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

alexusmai/laravel-purifier
==========================

HTML Purifier for Laravel 5

1.0(5y ago)14.5k2MITPHPPHP &gt;=5.6.4

Since Feb 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/alexusmai/laravel-purifier)[ Packagist](https://packagist.org/packages/alexusmai/laravel-purifier)[ RSS](/packages/alexusmai-laravel-purifier/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (11)Used By (0)

HTMLPurifier - Laravel 5 package
================================

[](#htmlpurifier---laravel-5-package)

[![Latest Stable Version](https://camo.githubusercontent.com/0b13219b5ea2ec672adf1e3f3d63f141a1d02742c06e4c798137a03867685a5a/68747470733a2f2f706f7365722e707567782e6f72672f616c657875736d61692f6c61726176656c2d70757269666965722f762f737461626c65)](https://packagist.org/packages/alexusmai/laravel-purifier)[![Total Downloads](https://camo.githubusercontent.com/5fa911f9b39b4e4b2343d0dda6428b8fc1effc01fb021abeec4b68462c53453c/68747470733a2f2f706f7365722e707567782e6f72672f616c657875736d61692f6c61726176656c2d70757269666965722f646f776e6c6f616473)](https://packagist.org/packages/alexusmai/laravel-purifier)[![Latest Unstable Version](https://camo.githubusercontent.com/19e7e533d2308c53fc72e7e0f97e0da2000e31ad955d48ffa2ecab9211340e49/68747470733a2f2f706f7365722e707567782e6f72672f616c657875736d61692f6c61726176656c2d70757269666965722f762f756e737461626c65)](https://packagist.org/packages/alexusmai/laravel-purifier)[![License](https://camo.githubusercontent.com/6cbfd7b20782c706dd1535904d1b93b641ee2200ca3dbddb6889ad610885c667/68747470733a2f2f706f7365722e707567782e6f72672f616c657875736d61692f6c61726176656c2d70757269666965722f6c6963656e7365)](https://packagist.org/packages/alexusmai/laravel-purifier)

HTML Purifier is a standards-compliant HTML filter library written in PHP.

About HTML Purifier -

Installation
------------

[](#installation)

Composer

```
composer require alexusmai/laravel-purifier
```

If you have Laravel 5.4 or earlier version, then add service provider to config/app.php and

```
Alexusmai\LaravelPurifier\LaravelPurifierServiceProvider::class,
```

add alias.

```
'Purifier' => Alexusmai\LaravelPurifier\Facades\PurifierFacade::class,
```

Publish config file (purifier.php)

```
php artisan vendor:publish --provider="Alexusmai\LaravelPurifier\LaravelPurifierServiceProvider"
```

Usage
-----

[](#usage)

Use default settings (config/purifier.php - default)

```
// 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)

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

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

Or you can use dynamic configuration

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

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

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 73.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~145 days

Recently: every ~139 days

Total

10

Last Release

2071d ago

Major Versions

0.9 → 1.02020-09-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7473505?v=4)[Aleksandr Manekin](/maintainers/alexusmai)[@alexusmai](https://github.com/alexusmai)

---

Top Contributors

[![alexusmai](https://avatars.githubusercontent.com/u/7473505?v=4)](https://github.com/alexusmai "alexusmai (17 commits)")[![ahoiroman](https://avatars.githubusercontent.com/u/23051150?v=4)](https://github.com/ahoiroman "ahoiroman (5 commits)")[![AlexanderWright](https://avatars.githubusercontent.com/u/2227317?v=4)](https://github.com/AlexanderWright "AlexanderWright (1 commits)")

---

Tags

laravelPurifier

### Embed Badge

![Health badge](/badges/alexusmai-laravel-purifier/health.svg)

```
[![Health](https://phpackages.com/badges/alexusmai-laravel-purifier/health.svg)](https://phpackages.com/packages/alexusmai-laravel-purifier)
```

###  Alternatives

[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M107](/packages/propaganistas-laravel-phone)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[sunspikes/clamav-validator

Custom Laravel 5 anti-virus validator for file uploads.

3651.8M3](/packages/sunspikes-clamav-validator)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
