Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-37205

Apostrophes in image macro parameters value do not survive a backup restore

    XMLWordPrintable

Details

    Description

      If an image from a different page is displayed in a page, and the page where the image is attached contains an apostrophe in the page title, upon taking a XML backup and restoring it, the image macro will display a Unknown Attachment error.

      This is caused because the apostrophe in the page title in the macro parameters has changed to:

      ’

      Repro steps:

      1. Create a personal space.
      2. Default home page is created with the title: User Name’s Home
      3. Attach an image to the home page.
      4. Create a new page in another space.
      5. In the new page, insert the image from User Name’s Home. The generated XHTML is:
        <ri:attachment ri:filename="filename.png"><ri:page ri:content-title="User Name's Home" ri:space-key="~username" /></ri:attachment></ac:image>
      6. Take a XML backup
      7. Restore the XML backup
      8. Go to the page created in step #4. Unknown Attachment is displayed instead of the image. The cause is that the apostrophe in the page name in the image macro parameter has been change to and the page cannot be found. The XHTML for the page is:
        <ri:attachment ri:filename="filename.png"><ri:page ri:content-title="User Name&rsquo;s Home" ri:space-key="~username" /></ri:attachment></ac:image>

      This could also affect other macros and other characters which are reserved XML characters.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aconde Alejandro Conde Carrillo (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: