Adds a standards compliant HTML filter to October CMS.

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 7

Forks: 2

Open Issues: 0


2.0.1 2021-05-28 14:31 UTC

This package is auto-updated.

Last update: 2022-11-28 17:44:11 UTC


An October CMS plugin which adds a standards compliant HTML filter to October CMS.

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



php artisan plugin:install Vdlp.HtmlPurifier

October CMS:

Go to Settings > Updates & Plugins > Install plugins and search for 'HtmlPurifier'.


To configure the filter execute this command:

php artisan vendor:publish --provider="Vdlp\HtmlPurifier\HtmlPurifierServiceProvider" --tag="config"

A configuration file named config/htmlpurifier.php is now created.

In depth information about configuration parameters can be found here: http://htmlpurifier.org/live/configdoc/plain.html


Use the `|purify' in your Twig templates to apply the HTML Purifier filter.

{{ contentFromCms|purify }}

{{ contentFromExternalSource|purify }}


{{ '<a href="" target="_blank">Some random HTML string</a>'|purify }}

For more information about templating in October CMS: http://octobercms.com/docs/markup/templating