Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

HTML Tag Usage

41 sites Security covered
View on drupal.org

This module reports on all HTML tags and attributes being used in your site's formatted text fields, helping you understand your content's HTML usage. It allows you to inspect specific tag and attribute combinations to see which content entities use them, which is useful for security audits or GDPR compliance.

Synopsis

The HTML Tag Usage module analyzes the contents of formatted text fields on your site and generates a report that lists all HTML tags and HTML attributes in use for each text format. You may inspect a tag/attribute combination to get a list of entities that use the tag/attribute combination.


Excerpt from HTML Tag Usage report page

Potential use cases for this module might include, but are not limited to:

  • You just took over maintenance of a Drupal installation from somebody else. Upon inspecting the text formats of the Drupal installation, you notice that none of them use the HTML filter and will just return the HTML as is. Now you would like to make the setup more secure by limiting HTML tags available for the text formats to what is actually needed, but you don't want to accidentally "alter" the content entered by the editors of your Drupal installation, so you need to know what tags and attributes are actually in use.
  • Your data protection officer wants you to remove any iframes that embed content from a popular video portal to maintain GDPR compliance. Upon inspecting the text formats on your site, you notice that some of them allow usage of iframe tags. You don't know, whether they are actually in use. You don't know, if a migration to video Media entities would best be done manually or if the number of iframe tags warrants writing a custom module to perform the migration. If you decided to perform a manual migration, you would need a list of entities that use iframe tags.


Inspect tag dialog

Note that the module is best used in a development environment and not in production. Depending on the size of your Drupal installation, the module may generate a huge database table to store results when analyzing the content of your site. Therefore, it is recommended to uninstall it as soon as you no longer need the report.


Generated HTML text filter configuration

Requirements

This module depends on the `text` module provided by Drupal Core.

Configuration

  1. Go to the configuration page of the module at Configuration > Development > HTML Tag Usage.
  2. Configure the field types of the formatted text fields, whose contents you want to be analyzed. By default, all formatted field types provided by the `text` module are selected for analysis.
  3. Go to the report page of the module at Reports > HTML Tag Usage.
  4. Click on the *Generate report* link to generate the report. A batch process will analyze all fields of the selected field types. Once the batch process is complete, you will be redirected to the generated report. You may regenerate the report at any time.
  5. Make sure to review the permissions provided by the module. There is one permission to administer the configuration, one permission to generate reports and one permission to view reports.

Credits

Current maintainers:

The development of this project has been partly sponsored by werk21 GmbH.

Activity

Total releases
1
First release
Nov 2025
Latest release
8 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.0-beta5 Pre-release Nov 6, 2025