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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrei.colesnic created an issue. See original summary.

the.tai.pen@gmail.com’s picture

Issue summary: View changes
the.tai.pen@gmail.com’s picture

Providing the patch to remove the encoding logic form the module and leave it to the TWIG.

the.tai.pen@gmail.com’s picture

Status: Active » Needs review
the.tai.pen@gmail.com’s picture

Version: 8.x-1.8 » 8.x-1.x-dev
Issue summary: View changes
VitalyM’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +html encoding

Works like a charm, thank you @andrei.colesnic!

  • micropat committed c5b812e on 8.x-1.x authored by andrei.colesnic
    Issue #2942824 by andrei.colesnic: Double encoding issue
    
  • micropat committed fd54993 on 8.x-1.x
    Issue #2942824 by andrei.colesnic: Double encoding issue
    
    Additionally,...
micropat’s picture

Priority: Major » Normal
Status: Reviewed & tested by the community » Fixed

Thanks for the quick dev patch and review!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.