PHPackages                             happydemon/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. [Security](/categories/security)
4. /
5. happydemon/purifier

ActiveKohana-module[Security](/categories/security)

happydemon/purifier
===================

Packages HTML purifier

1.2.2(12y ago)021MITPHPPHP &gt;5.3.2

Since Feb 2Pushed 12y ago1 watchersCompare

[ Source](https://github.com/happyDemon/purifier)[ Packagist](https://packagist.org/packages/happydemon/purifier)[ Docs](https://github.com/happyDemon/purifier)[ RSS](/packages/happydemon-purifier/feed)WikiDiscussions 3.3/master Synced 3d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Purifier for Kohana
===================

[](#purifier-for-kohana)

Overloads [Security::xss\_clean](http://kohanaframework.org/guide/api/Security#xss_clean) to provide secure XSS filtering using [HTML Purifier](http://htmlpurifier.org/).

Installing Purifier
===================

[](#installing-purifier)

### Using Git

[](#using-git)

If your application is in a Git repository, you can simply add this repository as a submodule:

```
git submodule add git://github.com/shadowhand/purifier.git modules/purifier
git submodule update --init --recursive

```

If you want to use a specific version, you can check out the tag of that version:

```
cd modules/purifier
git checkout v0.1.0
cd -
git add modules/purifier

```

Always remember to commit changes you make to submodules!

```
git commit -m 'Added Purifier module'

```

To install HTML Purifier, you will need to go into the purifier module directory and download it:

```
cd modules/purifier
git submodule update --init --recursive

```

*HTML Purifier is enabled as submodule of the Purifier module. Submodules of submodules are only automatically initialized if you use the --recursive flag*

### FTP or Plain Files

[](#ftp-or-plain-files)

For an untracked repository, you can [download](http://github.com/shadowhand/purifier/archives/master) the repository and install it to `MODPATH/purifier`. To download a specific version, select the tag on Github before clicking the download link.

You will also need to [download HTML Purifier](http://htmlpurifier.org/download) and install the entire "htmlpurifier" directory to `MODPATH/purifier/vendor/htmlpurifier`.

After Installation
------------------

[](#after-installation)

After HTML Purifier is installed, you will need to make the `library/HTMLPurifier/DefinitionCache/Serializer` in `MODPATH/purifier/vendor/htmlpurifier` writable by the web server.

Using Purifier
==============

[](#using-purifier)

To use Purifier, just call [Security::xss\_clean](http://kohanaframework.org/guide/api/Security#xss_clean) as you normally would. HTML Purifier will be used instead of the default "Bitflux" filter.

Advanced Usage
--------------

[](#advanced-usage)

If you want to access HTMLPurifier directly:

```
$html = Security::htmlpurifier();

```

You can configure the [HTMLPurifier settings](http://htmlpurifier.org/live/configdoc/plain.html) by creating `APPPATH/config/purifier.php`:

```
return array(
    'settings' => array(
        ... => ...
    ),
);

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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

Unknown

Total

1

Last Release

4484d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91a724ec7e90c57050c6fa0fa34f9faeec7041896866d4f8ddc85ed00b0f8887?d=identicon)[happyDemon](/maintainers/happyDemon)

---

Top Contributors

[![shadowhand](https://avatars.githubusercontent.com/u/38203?v=4)](https://github.com/shadowhand "shadowhand (10 commits)")[![ryross](https://avatars.githubusercontent.com/u/152982?v=4)](https://github.com/ryross "ryross (1 commits)")[![vitch](https://avatars.githubusercontent.com/u/9898?v=4)](https://github.com/vitch "vitch (1 commits)")

---

Tags

securityhtmlPurifierkohanaxss

### Embed Badge

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

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

###  Alternatives

[mews/purifier

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

2.0k16.7M113](/packages/mews-purifier)[voku/anti-xss

anti xss-library

72317.1M77](/packages/voku-anti-xss)[xemlock/htmlpurifier-html5

HTML5 support for HTML Purifier

1052.9M11](/packages/xemlock-htmlpurifier-html5)[luketowers/purifier

Laravel 5 HtmlPurifier Package

3280.0k9](/packages/luketowers-purifier)

PHPackages © 2026

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