Changes between Initial Version and Version 1 of Ticket #3402


Ignore:
Timestamp:
12/22/2015 11:37:11 AM (4 years ago)
Author:
kzar
Comment:

Note: Nested inline tags work generally, as a work around you could do something like this: <a href="#ref"><sup>1</sup></a>

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3402

    • Property Owner set to kzar
    • Property Summary changed from Allow nested inline tags in translation string to [CMS] Allow links inside of inline tags for translatable strings
    • Property Priority changed from Unknown to P3
    • Property Keywords cms added
    • Property Ready set
  • Ticket #3402 – Description

    initial v1  
    11=== Background === 
    2 In CMS we are [https://hg.adblockplus.org/cms/file/tip/cms/converters.py#l112 whitelisiting inline tags] that is allowed to be used in translation string, the problem is that it's not possible to use nested tags, ex. <sup><a href="#ref">1</a></sup> for marking footnote reference. 
     2Our CMS allows some inline HTML tags (`a`, `em`, `sup`, `strong`, `code`, `span`) inside of translatable strings. These tags can even be nested. 
     3 
     4It appears that this does not work correctly when an `<a>` tag (Or perhaps any tag with an attribute?) is nested inside of another inline tag. In that case the containing tag ends up being HTML escaped. 
    35 
    46=== What to change === 
    5 Allow nested whitelisted elements in translation string. 
     7Ensure that links inside of inline tags do not cause the the inline tag to be escaped. With example `Hello world <sup><a href="#ref">1</a></sup>`, the opening and closing `sup` tags should not be escaped.