Uploaded image for project: 'Markdown Syntax'
  1. Markdown Syntax
  2. MARKDOWN-95

HTML macro attributes are corrupted when rendering to CommonMark Markdown 1.2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 8.10.0
    • 8.9.1
    • markdown/1.2
    • None
    • Unknown

    Description

      When rendering an HTML macro to markdown/1.2, the Markdown escaping is applied to the whole HTML content, including tag attributes. Since Markdown doesn't process backslash escapes inside HTML tags, the attribute values are modified.

      Steps to reproduce

      Render the following xwiki/2.1 content to markdown/1.2:

      {{html}}<a href="x_y">a*b</a>{{/html}}
      

      Result

      <a href="x\_y">a\*b</a>
      

      The link now points to x_y instead of x_y.

      Expected

      The HTML tags (and their attributes) are output verbatim; only the text content is escaped where needed.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: