PHPackages                             devmonk/htmlpurifier - 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. [Templating &amp; Views](/categories/templating)
4. /
5. devmonk/htmlpurifier

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

devmonk/htmlpurifier
====================

Zend Framework 2 module that provides complete integration of HTMLPurifier library

0.1.1(13y ago)18203[2 issues](https://github.com/peteraba/devmonk-htmlpurifier/issues)LGPL v 2.1+PHPPHP &gt;=5.3.3

Since Nov 6Pushed 13y ago1 watchersCompare

[ Source](https://github.com/peteraba/devmonk-htmlpurifier)[ Packagist](https://packagist.org/packages/devmonk/htmlpurifier)[ Docs](https://github.com/devmonkcom/htmlpurifier)[ RSS](/packages/devmonk-htmlpurifier/feed)WikiDiscussions master Synced today

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

DevmonkHtmlpurifier
===================

[](#devmonkhtmlpurifier)

DevmonkHtmlpurifier is a module that integrates the [HTMLPurifier](http://htmlpurifier.org/) filter library with [Zend Framework 2](http://framework.zend.com) and optionally the [Twig](http://twig.sensiolabs.org) templating engine.

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

[](#installation)

1. Add `"devmonk/htmlpurifier": "dev-master"` to your `composer.json` file and run `php composer.phar update`.
2. Add `DevmonkHtmlpurifier` to your `config/application.config.php` file under the `modules` key.

Configuration
-------------

[](#configuration)

DevmonkHtmlpurifier has sane defaults out of the box but offers optional configuration via the `devmonk-htmlpurifier` configuration key.

```
`config` - passed directly to the HTMLPurifier class.
         - Added `Cache.SerializerPath` and set the default cache folder to data/cache/htmlpurifier
           Active by default.

```

Documentation
-------------

[](#documentation)

### View Helpers

[](#view-helpers)

DevmonkHtmlpurifier adds a view helper called 'purify' that will use the htmlpurifier with the set options.

### Twig Filters

[](#twig-filters)

DevmonkHtmlpurifier adds a filter called 'purify' for twig templates if zf-commons/zfc-twig is installed

### Namespaces

[](#namespaces)

The module supports [namespaces](http://twig.sensiolabs.org/doc/api.html#built-in-loaders) which can be configured using the `namespaces` configuration key:

```
'zfctwig' => array(
    'namespaces' => array(
        'admin'     => __DIR__ . '/../views/admin',
        'frontend'  => __DIR__ . '/../views/frontend',
    ),
),

```

When using a namespace the views will only be resolved to the specified namespace folder and not fallback to the View Manager resolver

Known issues
------------

[](#known-issues)

DevmonkHtmlpurifier does not support using multiple purifiers at the moment.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

4987d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/790e07c00547c3f488d989ba1c00016cb20fac90ed94b44ed7411f74fa7432e1?d=identicon)[peteraba](/maintainers/peteraba)

---

Tags

twigsecurityhtmlfiltermodulehtmlpurifierxsszf2malicious

### Embed Badge

![Health badge](/badges/devmonk-htmlpurifier/health.svg)

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

###  Alternatives

[latte/latte

☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.

1.3k16.2M776](/packages/latte-latte)[exercise/htmlpurifier-bundle

HTMLPurifier integration for your Symfony project

28012.1M20](/packages/exercise-htmlpurifier-bundle)[zf-commons/zfc-twig

Zend Framework 2 Module that provides a Twig rendering strategy and extensions to render actions or trigger events from your templates

93579.6k7](/packages/zf-commons-zfc-twig)[xemlock/htmlpurifier-html5

HTML5 support for HTML Purifier

1053.2M18](/packages/xemlock-htmlpurifier-html5)[voku/anti-xss-twig

Twig extension for XSS protection.

126.1k](/packages/voku-anti-xss-twig)[daycry/twig

twig for Codeigniter 4

155.5k2](/packages/daycry-twig)

PHPackages © 2026

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