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

Live Search Macro fails to open attachments that contain spaces in the name.

    XMLWordPrintable

Details

    Description

      When a user searches for an attachment that contain spaces the macro will work fine, however if he click on that attachment it will result in a page not find error.

      Steps to reproduce:

      1. Create a space and attach the to it the files "nospace.doc" and "with space.doc".
      2. Now create a new page and add the Live Search Macro.
      3. Search for the "nospace.doc", and click on it.
      4. File will open fine.
      5. Go back to the page where you added the Live Search Macro and search for the "with space.doc"
      6. You will get the page not found error.

      Workaround:

      If you remove spaces in the name of the attachment you will be able to open it using live search macro.

      Notes:

      If you go to Confluence Search Page and search for the attachment this will be the URL you will get:

      http://localhost:8090/download/attachments/1540098/with%20space.doc?version=1&modificationDate=1394227894728&api=v2 
      

      However when opening the file with Live Search Macro you will get below one in return:

      http://localhost:8090/download/attachments/1540098/with%2520space.doc?version=1&modificationDate=1394227894728&api=v2
      

      For some reason when using Live Search Macro the "%20" get replaced with "%2520"

      Attachments

        1. nospace.doc
          9 kB
        2. pagenotfound.PNG
          pagenotfound.PNG
          22 kB
        3. with space.doc
          9 kB

        Issue Links

          Activity

            People

              kma@atlassian.com Khanh Ma (Inactive)
              dluvison Deividi Luvison (Inactive)
              Votes:
              21 Vote for this issue
              Watchers:
              30 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: