PHPackages                             burzum/cakephp-html-purifier - 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. burzum/cakephp-html-purifier

AbandonedArchivedCakephp-plugin[Validation &amp; Sanitization](/categories/validation)

burzum/cakephp-html-purifier
============================

HtmlPurifier plugin for CakePHP

4.0.0(5y ago)43121.0k26[1 issues](https://github.com/burzum/cakephp-html-purifier/issues)1MITPHPPHP ^7.2

Since Feb 25Pushed 5y ago7 watchersCompare

[ Source](https://github.com/burzum/cakephp-html-purifier)[ Packagist](https://packagist.org/packages/burzum/cakephp-html-purifier)[ Docs](http://github.com/burzum/cakephp-html-purifier)[ RSS](/packages/burzum-cakephp-html-purifier/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (16)Used By (1)

CakePHP HTML Purifier Plugin
----------------------------

[](#cakephp-html-purifier-plugin)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/69ccfd6adb6d7be2e17cf5bc1435aaa58a33f6b0dd7203ef23589a5018014aff/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6275727a756d2f63616b657068702d68746d6c2d70757269666965722f322e302e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/burzum/cakephp-html-purifier)[![Scrutinizer Coverage](https://camo.githubusercontent.com/4389919a2436e6338fb80925371225adb8b92ba82e73e0b277c2de1a81a54c48/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6275727a756d2f63616b657068702d68746d6c2d70757269666965722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cakephp-html-purifier/)[![Code Quality](https://camo.githubusercontent.com/50cc0a65a6eb2b273e70b698f354c5816613121ffbc7d18653350eef52cbe275/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6275727a756d2f63616b657068702d68746d6c2d70757269666965722e7376673f6272616e63683d322e303f7374796c653d666c61742d737175617265)](https://scrutinizer.io/r/burzum/cakephp-html-purifier)

This is a CakePHP wrapper for [the HTML Purifier lib](http://htmlpurifier.org/).

HTML Purifier is a standards-compliant HTML filter library written in PHP. HTML Purifier will not only remove all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive whitelist, it will also make sure your documents are standards compliant, something only achievable with a comprehensive knowledge of W3C's specifications.

The plugin includes a trait, a view helper, a behavior and a shell to clean your markup wherever you like, in the view or in the model layer or clean any table and field using the shell.

---

- For **CakePHP 2.x** use the 1.x version or branch.
- For **CakePHP &lt;=3.5** use the 2.0 version or branch.
- For **CakePHP &gt; 3.5** use the 3.0 version or branch.

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

[](#documentation)

For documentation, as well as tutorials, see the [docs](docs/Home.md) directory of this repository.

Support
-------

[](#support)

For support and feature request, please visit the [Support Site](https://github.com/burzum/cakephp-html-purifier/issues).

Contributing to this Plugin
---------------------------

[](#contributing-to-this-plugin)

Please feel free to contribute to the plugin with new issues, requests, unit tests and code fixes or new features. If you want to contribute some code, create a feature branch from develop, and send us your pull request. Unit tests for new features and issues detected are mandatory to keep quality high.

- Contributions must follow the [PSR2 coding standard recommendation](https://github.com/php-fig-rectified/fig-rectified-standards).
- [Unit tests](https://book.cakephp.org/4/en/development/testing.html) are required.

License
-------

[](#license)

Copyright 2012 - 2018 Florian Krämer

Licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 78.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 ~180 days

Recently: every ~246 days

Total

15

Last Release

1940d ago

Major Versions

1.1.0 → 2.0.02015-07-03

1.1.1 → 2.0.22016-02-24

2.0.x-dev → 3.0-beta12018-05-14

1.x-dev → 3.0.x-dev2019-08-29

3.0.x-dev → 4.0.x-dev2021-01-24

PHP version history (2 changes)1.0.0PHP &gt;=5.3.2

4.0.x-devPHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0643e6255da841fe65260ec6e263d8908a40a84b884c32e9fc6be6a15e252fa8?d=identicon)[burzum](/maintainers/burzum)

---

Top Contributors

[![burzum](https://avatars.githubusercontent.com/u/162789?v=4)](https://github.com/burzum "burzum (26 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (3 commits)")[![hacheraw](https://avatars.githubusercontent.com/u/10481749?v=4)](https://github.com/hacheraw "hacheraw (2 commits)")[![repher](https://avatars.githubusercontent.com/u/2478563?v=4)](https://github.com/repher "repher (1 commits)")[![septech](https://avatars.githubusercontent.com/u/10768102?v=4)](https://github.com/septech "septech (1 commits)")

---

Tags

cakephpcakephp-plugincakephp-wrappercakephp2cakephp3cakephp4html-purifierpurifiersanitizationvalidationhtmlPurifiermarkupsanitizetidy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/burzum-cakephp-html-purifier/health.svg)

```
[![Health](https://phpackages.com/badges/burzum-cakephp-html-purifier/health.svg)](https://phpackages.com/packages/burzum-cakephp-html-purifier)
```

###  Alternatives

[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[xemlock/htmlpurifier-html5

HTML5 support for HTML Purifier

1052.9M11](/packages/xemlock-htmlpurifier-html5)[symfony/html-sanitizer

Provides an object-oriented API to sanitize untrusted HTML input for safe insertion into a document's DOM.

27932.2M63](/packages/symfony-html-sanitizer)[stolz/laravel-html-tidy

HTML Tidy middleware for Laravel

268.7k](/packages/stolz-laravel-html-tidy)[chrisshick/cakephp3-html-purifier

This is a CakePHP3 Purifier Plugin Behavior that cleanses data before it is marshalled into the entity.

12168.1k](/packages/chrisshick-cakephp3-html-purifier)

PHPackages © 2026

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