Changes between Version 2 and Version 3 of Ticket #3402


Ignore:
Timestamp:
12/22/2015 12:44:33 PM (4 years ago)
Author:
kzar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3402

    • Property Type changed from change to defect
    • Property Summary changed from [CMS] Allow links inside of inline tags for translatable strings to [CMS] Fix inline tag nesting for translatable strings
  • Ticket #3402 – Description

    v2 v3  
    22Our CMS allows some inline HTML tags (`a`, `em`, `sup`, `strong`, `code`, `span`) inside of translatable strings, they can even be nested. 
    33 
    4 It 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. 
     4Unfortunately nesting appears to be broken depending on the order of the tags. For example either `<em><sup>example</sup></em>` or `<sup><em>example</em></sup>` will work but not both. For one the outer tags will be HTML escaped. (To make matters worse the whitelisted tags are stored inside an unordered dictionary, so we can't even be sure of ''which'' of the two will work!) 
    55 
    66=== What to change === 
    7 Ensure that links inside of inline tags do not cause the the inline tag to be escaped. With the example string `Hello world <sup><a href="#ref">1</a></sup>` the opening and closing `sup` tags should not be escaped. 
     7Make relevant changes to `cms/converters.py` so that nesting of whitelisted HTML tags works despite the order in which they are nested. With the example string `Hello world <sup><a href="#ref">1</a></sup>` the opening and closing `sup` tags should not be escaped.