Module Description
Provides a Twig filter that removes HTML comments. Can be deprecated once https://www.drupal.org/project/drupal/issues/2672656 is resolved.
Requirements
* Drupal 8, 9 or 10
* PHP 7.2+
Usage: {# Print result as markup render array. #} {{ content.field_my_field|render|remove_html_comments }} {# Print result as string. #} {{ content.field_my_field|render|remove_html_comments_as_string }}
Requirements
* Drupal 8, 9 or 10
* PHP 7.2+
Usage: {# Print result as markup render array. #} {{ content.field_my_field|render|remove_html_comments }} {# Print result as string. #} {{ content.field_my_field|render|remove_html_comments_as_string }}
Module Link
Project Usage
782
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the issue of removing HTML comments using a Twig filter in Drupal 8, 9, or 10 with PHP 7.2+ until a specific Drupal project is resolved.
Data Name
twig_remove_html_comments