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

Links containing umlaut or cyrillic characters become invalid

XMLWordPrintable

      Summary

      When you insert a link that contains umlaut or cyrillic characters via Insert more content > Link > Web link or the shortcuts ⌘+K / CTRL+K, the link changes so that Confluence encodes the percentage (%) symbol as %25. This renders the link to be unusable.

      For example:

      1. Correct link inserted into a Confluence page: https://de.wikipedia.org/wiki/Die_L%C3%B6wen
      2. Incorrect link after saving the page and clicking on the link: https://de.wikipedia.org/wiki/Die_L%25C3%25B6wen

      You can see the % symbol in the original link has been replaced as %25.

      Steps to Reproduce

      Option 1

      1. Create a new page and insert a web link via one of the methods below:
        • Insert more content > Link > Web link
        • ⌘+K / CTRL+K
      2. Insert this URL into the 'Address' field: https://de.wikipedia.org/wiki/Die_L%C3%B6wen
      3. Insert any text into the the 'Link text' field.
      4. Click on "Insert".
      5. Save the page.
      6. Try to open the link.

      Option 2

      1. Create a new page and paste a web link
      2. Edit the link and see that the 'Address' and 'Link text' field have not changed
      3. Change the 'Link text' field to new text
      4. Save the link
      5. Edit the link again
      6. The URL in the 'Address' field has now been changed

      Expected Results

      The link on the page should direct you to the correct page: https://de.wikipedia.org/wiki/Die_L%C3%B6wen

      Actual Results

      The link directs you to an invalid page: https://de.wikipedia.org/wiki/Die_L%25C3%25B6wen

      Notes

      Tested in Confluence 5.9.14. The functionality works as expected

      Workaround

      Option 1: Replace all % signs in links with spaces instead

      1. Take: https://de.wikipedia.org/wiki/Die_L%C3%B6wen URL
      2. Change to: https://de.wikipedia.org/wiki/Die_L C3 B6wen

      Option 1: Paste the link into the editor instead of using insert link dialog.

      • In this method you cannot modify the link text, so the link text will be automatically set based on the url

      Option 2: Use square brackets to insert the link. [ ]

      1. Type "["
      2. Type the text you want for your link in the editor, for example "My Link"
      3. Type a "|"
      4. Type the url
      5. Type "]" to complete the link.
      6. Save or preview the page to confirm it works.
      7. Important! Don't open the link dialog for this link. If you do, the link will be double-encoded.

      For step 4, you could also try pasting the url but this might have less success since the url will be converted to a link automatically and you might have to first undo that automatic conversion, which in turn may cause the closing "]" to have no effect. See option 3 instead.

      Option 3

      1. Paste the URL into the editor.
      2. Press undo to undo any automatic link creation/extraction so you see the original URL.
      3. If the URL is still a link, click it, and click "Unlink" to return it back to regular text.
      4. At the beginning of the link, type [ followed by `Escape` to exit the Link Autocomplete
      5. Type the text to display for the link followed by "|"
      6. Now your link should look like this
      7. Click at the end of the link and type "]" to complete the link. This should auto-convert it to a link with the desired text.
      8. Save or preview the page to confirm it works.
      9. Important! Don't open the link dialog for this link. If you do, the link will be double-encoded.

       

      Option 4: Using the Source Editor to change links after adding them

      1. Install the Confluence Source Editor (free add-on)
      2. Edit the page
      3. Click on the <> icon in the top right
      4. Find the href= attribute that contains the '%25' in the URL
      5. Replace it with just '%'
      6. Apply the changes and save the page

              qpham@atlassian.com Quan Pham
              azolkefli Athirah Zolkefli
              Votes:
              55 Vote for this issue
              Watchers:
              81 Start watching this issue

                Created:
                Updated:
                Resolved: