Opened 2 years ago

Closed 12 months ago

#7048 closed defect (fixed)

[CMS] Translations returned by get_string are distorted in non-default locales when the string is coming from the default locale

Reported by: kvas Assignee: kvas
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



CMS revision 1d0e9a76f62d, static generation or test server.

How to reproduce

See #148 in GitLab or follow these steps for a micro-scenario:

  1. Set up a page that is a template containing the following code: {{ get_string('demo') }}
  2. In the translation file for the default locale assign the following text to the translation string for "demo": <a href="">Foo</a>.
  3. In the translation file for another locale make sure that the translation for "demo" is absent.
  4. Visit the page in another locale.

Observed behaviour

The HTML markup of the link in the translation string is quoted, the source of the page contains:

&lt;a href=&quot;;&gt;foo&lt;/a&gt;

instead of

<a href="">Foo</a>

Expected behaviour

The HTML markup of the link should not be quoted (this is the behavior in the default locale, which is using the same string).

Note: the explanation of the reason for this bug can be found in #148. Look for crossed-out text.

Change History (3)

comment:1 Changed 2 years ago by kvas

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 2 years ago by abpbot

A commit referencing this issue has landed:
Issue 7048 - Fix erroneous markup escaping in translation strings

comment:3 Changed 12 months ago by kvas

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.