PHPackages                             seppzzz/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. seppzzz/htmlpurifier

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

seppzzz/htmlpurifier
====================

A simple wrapper around HtmlPurifier \[http://htmlpurifier.org/\]

06PHP

Since Sep 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/seppzzz/htmlpurifier)[ Packagist](https://packagist.org/packages/seppzzz/htmlpurifier)[ RSS](/packages/seppzzz-htmlpurifier/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

HtmlPurifier
============

[](#htmlpurifier)

A simple wrapper around HtmlPurifier \[\]

Introduction
------------

[](#introduction)

This module adds a wrapper named Purifier around the famous HtmlPurifier. You can use HtmlPurifier by itself, or use some of the custom function to have clean HTML or XHTML code, TXT code or to strip the \[embed\] tags. It's also possible to extend the Purifier class to add your own purifier functions.

Requirements
------------

[](#requirements)

- SilverStripe &gt;= 4.1 &lt; 5.0

For 3.x installations refer to the 1.x version

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

[](#installation)

Install the module through [composer](http://getcomposer.org):

```
composer require seppzzz/htmlpurifier "dev-main"
composer update

```

Usage
-----

[](#usage)

Whenever you need to purify your HTML code, eg. during OnBeforeWrite, OnAfterWrite or in a custom search, just call the wrapper function:

```
$content = Purifier::PurifyTXT($p->Content);
$content = Purifier::RemoveEmbed($content);
```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8b4f1ff3d3079c2907fd8b5abcd67e41c1b348f1cf7f1624e8815cf87a6cd4c?d=identicon)[seppzzz](/maintainers/seppzzz)

### Embed Badge

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

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

###  Alternatives

[spatie/dns

Retrieve DNS records

6082.3M17](/packages/spatie-dns)[fancyguy/webroot-installer

A composer installer for libraries that live in an application webroot.

1311.3M15](/packages/fancyguy-webroot-installer)[kartik-v/yii2-widget-colorinput

An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)

324.8M10](/packages/kartik-v-yii2-widget-colorinput)[tonegabes/filament-better-options

Filament form components for better radio and checkbox options.

155.2k](/packages/tonegabes-filament-better-options)[p3ym4n/jdate

Date converter from Jalali to Georgian and vice versa. It has Carbon instance inside and it's Laravel friendly.

101.8k2](/packages/p3ym4n-jdate)

PHPackages © 2026

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