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).