Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Twig HTML Special Chars Decode

Security covered Maintenance fixes only 390 sites

Part of the Twig ecosystem · 43 projects

This module provides a Twig filter for Drupal 9 that decodes HTML special characters, similar to functionality removed in Drupal 9's Twig environment. It allows you to convert HTML entities back into their corresponding characters within Twig templates.

In Drupal 8 it was possible to decode HTML special characters in Twig using convert_encoding('UTF-8', 'HTML-ENTITIES') as this filter relied on mbstring extension.

However it is not possible anymore in Drupal 9 as it relies on iconv instead, and the mentioned filter throws an error:

Notice: iconv(): Wrong charset, conversion from `HTML-ENTITIES' to `UTF-8' is not allowed in twig_convert_encoding()

This module provides a new Twig filter htmlspecialchars_decode for Drupal 9 which does the same job (basically runs htmlspecialchars_decode() against the text).

Drupal 9–11

Ask your assistant about Twig HTML Special Chars Decode

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.1 Stable 9–11 May 2, 2025
1.0.0 Stable 9–10 Sep 26, 2023