Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When special characters are present - an issue of double encoding appears. TWIG by default encodes the variables it is described here https://symfony.com/doc/current/templating/escaping.html , more specifically If you're using Twig templates, then output escaping is on by default. . So there is no point in manually escaping the values in the module's code - which will result in double encoding and broken titles when sharing nodes. (Ex: mail sharing). A solution will be to remove the encoding logic from the code and leave this to the TWIG. A patch will be provided shortly.
Comment | File | Size | Author |
---|---|---|---|
#3 | addtoany-double_encoding-2942824-03-8.patch | 836 bytes | the.tai.pen@gmail.com |
double encoding addtoany.png | 9.72 KB | the.tai.pen@gmail.com |
Comments
Comment #2
the.tai.pen@gmail.com CreditAttribution: the.tai.pen@gmail.com at FFW commentedComment #3
the.tai.pen@gmail.com CreditAttribution: the.tai.pen@gmail.com at FFW commentedProviding the patch to remove the encoding logic form the module and leave it to the TWIG.
Comment #4
the.tai.pen@gmail.com CreditAttribution: the.tai.pen@gmail.com at FFW commentedComment #5
the.tai.pen@gmail.com CreditAttribution: the.tai.pen@gmail.com at FFW commentedComment #6
VitalyM CreditAttribution: VitalyM at FFW commentedWorks like a charm, thank you @andrei.colesnic!
Comment #8
micropat CreditAttribution: micropat commentedThanks for the quick dev patch and review!