Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

htmlawed

1,290 sites Security covered
View on drupal.org

The htmLawed module uses the htmLawed PHP library to restrict and purify HTML for compliance with site administrator policy and standards and for security. Use of the htmLawed library allows for highly customizable control of HTML markup. See the guide for more on the module.

Its speed and configurability as well as full HTML coverage sets htmLawed apart from the in-built Drupal HTML filter and many other filters that require external applications like HTML Tidy or use incomplete, or large and resource-intensive libraries like HTMLPurifier.

htmLawed can be used to make text with HTML more secure, and HTML standards- and admin. policy-compliant. It can auto-correct and beautify HTML markup and restrict elements, attributes, and URL protocols in the input. It also balances tags and checks for proper nesting of HTML elements, transforms deprecated tags and attributes, checks and converts character entities, obfuscates email addresses as an anti-spam measure, etc. htmLawed is a GPL 3/LGPL 2+ licensed, single-file script with a peak memory usage of just ~1 Mb, and is well-documented. You can test htmLawed on this demo site.

The htmLawed library distributed with the module may not be up-to-date. Admins can look for a newer version of htmLawed on its website.

Activity

Total releases
2
First release
May 2025
Latest release
1 year ago
Release cadence
0 days
Stability
100% stable

Releases

Version Type Release date
7.x-3.16 Stable May 2, 2025
4.1.6 Stable May 2, 2025