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

Links and web images with URLs containing certain non-alphanumeric characters fail to save

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Symptoms

      Any time a URL contains a character that is invalid as per the URI RFC, or one of a small set of valid characters ("*", "[", "]", "'", " ' "), the link will fail to save correctly. The link will appear on the page, but not clickable. The anchor tag is empty and the URL is not saved into the BODYCONTENT table.

      Similar behavior occurs when inserting an image from the web with an URL containing an invalid character. While the image renders in edit mode, upon saving the page there will be a red "Broken Image" placeholder.

      Steps to reproduce:

      • Click Link > Web Link tab
      • Insert an URL with an invalid character. For example: http://www.google.com/* (this is a bogus URL)
      • Click Insert
      • Save page

      Workaround:

      Use an encoded entity in the format "%<hexit><hexit>" (reference) in place of the invalid character when injecting the URL.

      OR a simpler way would be:

      1. Go to Google Shortner at https://goo.gl/
      2. Paste the URL
      3. Google will generate a short url for your URL which you will be able to link.
      4. Google will also be change your long URL to alphanumeric characters, which can also be saved.

            [CONFSERVER-24320] Links and web images with URLs containing certain non-alphanumeric characters fail to save

            A fix for this issue is now available for Confluence Server customers.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Jade Giacoppo (Inactive) added a comment - A fix for this issue is now available for Confluence Server customers. Upgrade now or check out the Release Notes to see what other issues are resolved.

            good suggestion, thank you!

            Shayne Muelling added a comment - good suggestion, thank you!

            Until this is fixed... you can use the destination page's tiny url in your link. Or for non-Confluence destinations, generate a tiny url with one of the many tiny url services.

            Chad Barnes added a comment - Until this is fixed... you can use the destination page's tiny url in your link. Or for non-Confluence destinations, generate a tiny url with one of the many tiny url services.

            Shayne Muelling added a comment - - edited

            This is still a problem in Confluence 5.6.5. Links in Confluence to the JIRA user's guide (https://confluence.atlassian.com/display/AGILE/JIRA+User's+Guide) do not work because of this issue.

            Workaround: encode the apostrophe in links (e.g. replace with %27, or https://confluence.atlassian.com/display/JIRA/JIRA+User%27s+Guide)

            Please either remove the apostrophe from the JIRA user's guide link OR fix the bug in Confluence. It's very difficult to direct new user's to the appropriate documentation because of this issue!

            Shayne Muelling added a comment - - edited This is still a problem in Confluence 5.6.5. Links in Confluence to the JIRA user's guide ( https://confluence.atlassian.com/display/AGILE/JIRA+User's+Guide ) do not work because of this issue. Workaround: encode the apostrophe in links (e.g. replace with %27, or https://confluence.atlassian.com/display/JIRA/JIRA+User%27s+Guide ) Please either remove the apostrophe from the JIRA user's guide link OR fix the bug in Confluence. It's very difficult to direct new user's to the appropriate documentation because of this issue!

            You can add version 5.6.5 to the affected versions list as well. I am getting the same issue with links that contain apostrophes in the URL.

            Eric Pozzobon added a comment - You can add version 5.6.5 to the affected versions list as well. I am getting the same issue with links that contain apostrophes in the URL.

            Doug added a comment -

            This is still a problem in Confluence 5.6.6. Today while updating internal documentation, we added a link to Atlassian Documentation (https://confluence.atlassian.com/display/AGILE/JIRA+Agile+User's+Guide). There is apostrophe in the URL and caused our Confluence to not render the link. Please fix the problem or at least remove the apostrophes from your documentation pages.

            Doug added a comment - This is still a problem in Confluence 5.6.6. Today while updating internal documentation, we added a link to Atlassian Documentation ( https://confluence.atlassian.com/display/AGILE/JIRA+Agile+User's+Guide ). There is apostrophe in the URL and caused our Confluence to not render the link. Please fix the problem or at least remove the apostrophes from your documentation pages.

            Potentially fixed by CONF-32258

            Ivan Loire (Inactive) added a comment - Potentially fixed by CONF-32258

            Laura Kolker added a comment - - edited

            Related example: trying to link to a confluence page with a header containing apostrophes just won't work in the editor. If I try to save the link with an alias, the URL is deleted, even though the link formatting is maintained. If I try to save the link with no alias, the URL that is used is cut off as of the first apostrophe.
            Example:

            https://confluence.atlassian.com/display/JIRA/Managing+Global+Permissions#ManagingGlobalPermissions-About'JIRASystemAdministrators'and'JIRAAdministrators'

            (in OnDemand)

            Laura Kolker added a comment - - edited Related example: trying to link to a confluence page with a header containing apostrophes just won't work in the editor. If I try to save the link with an alias, the URL is deleted, even though the link formatting is maintained. If I try to save the link with no alias, the URL that is used is cut off as of the first apostrophe. Example: https://confluence.atlassian.com/display/JIRA/Managing+Global+Permissions#ManagingGlobalPermissions-About'JIRASystemAdministrators'and'JIRAAdministrators ' (in OnDemand)

            Andy Cleff added a comment - - edited

            With a single quote in a URL, the image macro fails to save - there will be a red "Broken Image" placeholder.

            Replace the single quote (apostrophe) with %27 as a workaround.

            Asterisks work fine.

            Andy Cleff added a comment - - edited With a single quote in a URL, the image macro fails to save - there will be a red "Broken Image" placeholder. Replace the single quote (apostrophe) with %27 as a workaround. Asterisks work fine.

            I'm very glad to see this issue has been changed to Major. If you specify link text along with the URL and save the page, the URL is entirely lost and cannot be recovered from Confluence. That's a serious problem that I have felt obliged to highlight to our users as we prepare to upgrade from Confluence 3.5 to 4.3.7 this coming weekend. I'm recommending that they always use the Preview to verify that the link works before saving the page.

            Wendy Fergusson added a comment - I'm very glad to see this issue has been changed to Major . If you specify link text along with the URL and save the page, the URL is entirely lost and cannot be recovered from Confluence. That's a serious problem that I have felt obliged to highlight to our users as we prepare to upgrade from Confluence 3.5 to 4.3.7 this coming weekend. I'm recommending that they always use the Preview to verify that the link works before saving the page.

              jgiacoppo Jade Giacoppo (Inactive)
              rchang Robert Chang
              Affected customers:
              38 This affects my team
              Watchers:
              52 Start watching this issue

                Created:
                Updated:
                Resolved: