PHPackages                             totara/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. totara/htmlpurifier

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

totara/htmlpurifier
===================

Totara fork of HTMLPurifier

4.19.1(3mo ago)01.3k↓14.6%LGPL-2.1-or-laterPHPPHP ~8.4.0 || ~8.5.0CI failing

Since Sep 15Pushed 3mo agoCompare

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

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

HTML Purifier
=============

[](#html-purifier)

Totara fork of HTML Purifier.

HTML Purifier is an HTML filtering solution that uses a unique combination of robust whitelists and aggressive parsing to ensure that not only are XSS attacks thwarted, but the resulting HTML is standards compliant.

HTML Purifier is oriented towards richly formatted documents from untrusted sources that require CSS and a full tag-set. This library can be configured to accept a more restrictive set of tags, but it won't be as efficient as more bare-bones parsers. It will, however, do the job right, which may be more important.

Places to go:

- See INSTALL for a quick installation guide
- See docs/ for developer-oriented documentation, code examples and an in-depth installation guide.
- See WYSIWYG for information on editors like TinyMCE and FCKeditor

HTML Purifier can be found on the web at:

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

[](#installation)

Package available on [Composer](https://packagist.org/packages/ezyang/htmlpurifier).

If you're using Composer to manage dependencies, you can use

```
$ composer require ezyang/htmlpurifier

```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 76.8% 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 ~1244 days

Total

2

Last Release

97d ago

PHP version history (2 changes)4.15.0PHP ~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0

4.19.1PHP ~8.4.0 || ~8.5.0

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/654ac6b1ad4fd1c52ca53449905ed2fba0207dd3afa5cc163683aab883878ddc?d=identicon)[codytotara](/maintainers/codytotara)

---

Top Contributors

[![ezyang](https://avatars.githubusercontent.com/u/13564?v=4)](https://github.com/ezyang "ezyang (268 commits)")[![bytestream](https://avatars.githubusercontent.com/u/1788397?v=4)](https://github.com/bytestream "bytestream (17 commits)")[![TimWolla](https://avatars.githubusercontent.com/u/209270?v=4)](https://github.com/TimWolla "TimWolla (8 commits)")[![xemlock](https://avatars.githubusercontent.com/u/952555?v=4)](https://github.com/xemlock "xemlock (6 commits)")[![zerocrates](https://avatars.githubusercontent.com/u/298975?v=4)](https://github.com/zerocrates "zerocrates (5 commits)")[![PHPGangsta](https://avatars.githubusercontent.com/u/608408?v=4)](https://github.com/PHPGangsta "PHPGangsta (5 commits)")[![Synchro](https://avatars.githubusercontent.com/u/81561?v=4)](https://github.com/Synchro "Synchro (4 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (4 commits)")[![Xiphin](https://avatars.githubusercontent.com/u/3348428?v=4)](https://github.com/Xiphin "Xiphin (3 commits)")[![matsuo](https://avatars.githubusercontent.com/u/141021?v=4)](https://github.com/matsuo "matsuo (2 commits)")[![mpyw](https://avatars.githubusercontent.com/u/1351893?v=4)](https://github.com/mpyw "mpyw (2 commits)")[![pieterocp](https://avatars.githubusercontent.com/u/68863060?v=4)](https://github.com/pieterocp "pieterocp (2 commits)")[![snapshotpl](https://avatars.githubusercontent.com/u/312655?v=4)](https://github.com/snapshotpl "snapshotpl (2 commits)")[![kish0808](https://avatars.githubusercontent.com/u/44048735?v=4)](https://github.com/kish0808 "kish0808 (2 commits)")[![totten](https://avatars.githubusercontent.com/u/1336047?v=4)](https://github.com/totten "totten (2 commits)")[![elirenato](https://avatars.githubusercontent.com/u/9608366?v=4)](https://github.com/elirenato "elirenato (2 commits)")[![kitrio](https://avatars.githubusercontent.com/u/7542987?v=4)](https://github.com/kitrio "kitrio (2 commits)")[![royopa](https://avatars.githubusercontent.com/u/442991?v=4)](https://github.com/royopa "royopa (1 commits)")[![SandroMiguel](https://avatars.githubusercontent.com/u/6423157?v=4)](https://github.com/SandroMiguel "SandroMiguel (1 commits)")[![okainov](https://avatars.githubusercontent.com/u/918446?v=4)](https://github.com/okainov "okainov (1 commits)")

---

Tags

html

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-html

A fluent html builder

8376.4M72](/packages/spatie-laravel-html)[ckeditor/ckeditor

JavaScript WYSIWYG web text editor.

5234.2M76](/packages/ckeditor-ckeditor)[caxy/php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.

21320.9M15](/packages/caxy-php-htmldiff)[yajra/laravel-datatables-html

Laravel DataTables HTML builder plugin

2899.6M48](/packages/yajra-laravel-datatables-html)[wa72/htmlpagedom

jQuery-inspired DOM manipulation extension for Symfony's Crawler

3383.9M34](/packages/wa72-htmlpagedom)[tinymce/tinymce

Web based JavaScript HTML WYSIWYG editor control.

1697.5M106](/packages/tinymce-tinymce)

PHPackages © 2026

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