Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-3656

Unnatural syntax generated when applying styles to formatting tags

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.1, 1.9 M1
    • Fix Version/s: 1.8.2, 1.9 M2
    • Component/s: {Unused} Rendering 2.0
    • Labels:
      None
    • Environment:
      any
    • keywords:
      unnatural syntax style format tag
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      The following XHTML snippet:

      <p><em style="color:#F00;">xy</em><span style="color:#F00">z</span></p>
      

      is transformed into:

      //(% style="color:#F00;" %)xy//z
      

      The XWiki syntax looks wrong to me, although it is rendered back to XHTML fine. What I find unnatural is:

      • the custom parameter syntax is inside the italic markers although the parameters are applied to the EM element
      • the style (custom parameter) applies beyond the italic closing marker (this is right in order to be equivalent to the XHTML input, but not obvious by looking at the syntax)

      Another example is this:

      <p>1<em><span style="color:#F00;">xy</span></em><span style="color:#F00;">z</span>2</p>
      

      is transformed into:

      1//(% style="color:#F00;" %)xy//z(%%)2
      

      This time the order of the closing markers is more striking.

        Attachments

          Activity

            People

            Assignee:
            vmassol Vincent Massol
            Reporter:
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: