Opened on 10/16/2018 at 09:26:49 AM

Closed on 09/17/2019 at 11:43:49 AM

#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):

https://codereview.adblockplus.org/29912578/

Description

Environment

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="http://foo.com/">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;http://foo.com/&quot;&gt;foo&lt;/a&gt;

instead of

<a href="http://foo.com/">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.

Attachments (0)

Change History (3)

comment:1 Changed on 10/16/2018 at 10:54:05 AM by kvas

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

comment:2 Changed on 10/17/2018 at 03:45:48 PM by abpbot

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

comment:3 Changed on 09/17/2019 at 11:43:49 AM by kvas

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from kvas.
 
Note: See TracTickets for help on using tickets.