PHPackages                             hiraeth/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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. hiraeth/htmlpurifier

ActiveOpus-package[Validation &amp; Sanitization](/categories/validation)

hiraeth/htmlpurifier
====================

HTMLPurifier for the Hiraeth Nano-Framework

1.0.0(2y ago)0881MITPHP

Since Apr 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hiraeth-php/htmlpurifier)[ Packagist](https://packagist.org/packages/hiraeth/htmlpurifier)[ RSS](/packages/hiraeth-htmlpurifier/feed)WikiDiscussions master Synced 3w ago

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

HTMLPurifier is a robust and highly configurable filter for HTML content to ensure security and cleanliness of user inputted HTML.

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

[](#installation)

```
composer require hiraeth/htmlpurifier

```

The `htmlpurifier.jin` configuration will be automatically copied to your `config` directory via [opus](https://github.com/imarc/opus).

Delegates
---------

[](#delegates)

Operative ClassOperative IntefacesProvides`HTMLPurifier`Class OnlyConfiguration for common HTMLPurifier settingsProviders
---------

[](#providers)

No providers are included in this package.

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

[](#configuration)

```
; The location to store serialized purifier information.  This is essentially a cache.

cache_path = writable/cache/htmlpurifier

; Whether or not we should remove empty elements.  Note that if this is set to true, elements
; containing only non-breaking space characters will also be removed.

remove_empty = true

; Whether or not the HTML we're purifying should be considered trusted.

trusted = false

; Forbidden HTML (attributes, elements, classes)

forbidden = {
	"attributes": [],
	"elements": [],
	"classes": []
}
```

Usage
-----

[](#usage)

See [the HTMLPurifier documentation](http://htmlpurifier.org/docs) for more information on what how to use the purifier. Additional configuration will be normalized with time. If you have specific requests, please submit an issue or pull request.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

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

832d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ab2b91daf2aa6e4c7f98f785a3135daa3e9998bd7021d89df05a374e28ecde5?d=identicon)[mattsah](/maintainers/mattsah)

---

Top Contributors

[![mattsah](https://avatars.githubusercontent.com/u/586346?v=4)](https://github.com/mattsah "mattsah (1 commits)")

### Embed Badge

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

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

###  Alternatives

[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5386.2M30](/packages/stevebauman-purify)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

749284.3k35](/packages/civicrm-civicrm-core)[xemlock/htmlpurifier-html5

HTML5 support for HTML Purifier

1063.1M16](/packages/xemlock-htmlpurifier-html5)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M517](/packages/shopware-core)[verbb/formie

The most user-friendly forms plugin for Craft.

100387.6k57](/packages/verbb-formie)[oat-sa/tao-core

TAO core extension

66140.1k108](/packages/oat-sa-tao-core)

PHPackages © 2026

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