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

XWiki 2.0 renderer doesn't escape ~ in image reference

    XMLWordPrintable

Details

    • Unit
    • Unknown

    Description

      The following XWiki 2.0 syntax:

      [[image:http://thor.info.uaic.ro/~~evalica/img/x_logo_xwiki.png]]
      

      (notice that we have to escape the ~, otherwise the URL of the external image is badly parsed) generates this HTML comment:

      <!--startimage:http://thor.info.uaic.ro/~evalica/img/x_logo_xwiki.png-->
      

      As expected, ~ is not escaped because the escaping was specific to XWiki 2.0 syntax (~ is not necessarily a special symbol in other syntaxes). When this HTML comment is transformed back to XWiki 2.0 syntax (e.g. when saving the page in WYSIWYG mode) the result is:

      [[image:http://thor.info.uaic.ro/~evalica/img/x_logo_xwiki.png]]
      

      As you can see ~ not escaped anymore and the image URL is badly parsed as a result.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: