PHPackages                             elementareteilchen/html-purify - 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. elementareteilchen/html-purify

ActiveTypo3-cms-extension[Templating &amp; Views](/categories/templating)

elementareteilchen/html-purify
==============================

Adds html purify functionality as viewhelper and service class

v2.0.0(1y ago)3290↑204.3%1GPL-2.0+PHP

Since Jan 19Pushed 1y ago3 watchersCompare

[ Source](https://github.com/ElementareTeilchen/html_purify)[ Packagist](https://packagist.org/packages/elementareteilchen/html-purify)[ RSS](/packages/elementareteilchen-html-purify/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

TYPO3 Extension html\_purify
============================

[](#typo3-extension-html_purify)

Purify HTML to prevent XSS attacks or unwanted HTML.

Features
--------

[](#features)

This extension provides you with opportunities to purify specific HTML which may is not fully under your control in order to remove possible Cross-Site-Scripting (XSS) attacks.

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

[](#installation)

Simply install the extension with Composer.

`composer require elementareteilchen/html-purify`

This extension uses [ezyang/htmlpurifier](https://github.com/ezyang/htmlpurifier), which is set as composer requirement to be loaded automatically.

Usage
-----

[](#usage)

### Viewhelper

[](#viewhelper)

```
{someVariableWithPotentialXSS -> f:format.raw()}

```

```
{someVariableWithPotentialXSS -> f:format.raw() -> hp:purify()}

```

```
{hp:purify(allowedHtmlTags: 'p,strong', htmlContent: 'Text with HTML but EM will be removed')}

```

### Service in PHP code

[](#service-in-php-code)

```
$purifiedHtml = \ElementareTeilchen\HtmlPurify\Service\PurifyService::purify($htmlContent, $allowedHtmlTags);

```

###  Health Score

33

—

LowBetter than 76% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.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 ~315 days

Total

5

Last Release

629d ago

Major Versions

v1.2.0 → v2.0.02024-07-04

### Community

Maintainers

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

---

Top Contributors

[![mueller-sebastian](https://avatars.githubusercontent.com/u/20316366?v=4)](https://github.com/mueller-sebastian "mueller-sebastian (8 commits)")[![sabbelasichon](https://avatars.githubusercontent.com/u/13050560?v=4)](https://github.com/sabbelasichon "sabbelasichon (1 commits)")

---

Tags

extensiontypo3

### Embed Badge

![Health badge](/badges/elementareteilchen-html-purify/health.svg)

```
[![Health](https://phpackages.com/badges/elementareteilchen-html-purify/health.svg)](https://phpackages.com/packages/elementareteilchen-html-purify)
```

###  Alternatives

[helhum/typoscript-rendering

Can render a TypoScript path by URL, especially useful for Ajax dispatching

67649.3k12](/packages/helhum-typoscript-rendering)[dirkpersky/typo3-rte-ckeditor-fontawesome

Adds the Fontawesome add-on to the CKEditor in TYPO3.

16146.4k](/packages/dirkpersky-typo3-rte-ckeditor-fontawesome)[templavoilaplus/templavoilaplus

Building kit for custom pages and content elements with individual fields, containers and backend layouts. Supporting drag'n'drop and multiple references.

2637.3k12](/packages/templavoilaplus-templavoilaplus)

PHPackages © 2026

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