-
Bug
-
Resolution: Fixed
-
High
-
6.0.3, 6.0.4, 6.0.6, 6.1.0, 6.0.7, 6.1.1
-
19
-
Severity 3 - Minor
-
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:
- Correct link inserted into a Confluence page: https://de.wikipedia.org/wiki/Die_L%C3%B6wen
- 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
- Create a new page and insert a web link via one of the methods below:
- Insert more content > Link > Web link
- ⌘+K / CTRL+K
- Insert this URL into the 'Address' field: https://de.wikipedia.org/wiki/Die_L%C3%B6wen
- Insert any text into the the 'Link text' field.
- Click on "Insert".
- Save the page.
- Try to open the link.
Option 2
- Create a new page and paste a web link
- Edit the link and see that the 'Address' and 'Link text' field have not changed
- Change the 'Link text' field to new text
- Save the link
- Edit the link again
- 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
Take: https://de.wikipedia.org/wiki/Die_L%C3%B6wen URLChange 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. [ ]
- Type "["
- Type the text you want for your link in the editor, for example "My Link"
- Type a "|"
- Type the url
- Type "]" to complete the link.
- Save or preview the page to confirm it works.
- 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
- Paste the URL into the editor.
- Press undo to undo any automatic link creation/extraction so you see the original URL.
- If the URL is still a link, click it, and click "Unlink" to return it back to regular text.
- At the beginning of the link, type [ followed by `Escape` to exit the Link Autocomplete
- Type the text to display for the link followed by "|"
- Now your link should look like this
- 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.
- Save or preview the page to confirm it works.
- 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
- Install the Confluence Source Editor (free add-on)
- Edit the page
- Click on the <> icon in the top right
- Find the href= attribute that contains the '%25' in the URL
- Replace it with just '%'
- Apply the changes and save the page
- incorporates
-
CONFSERVER-45688 Attachments with names that contain spaces encode to a broken link in Confluence 6.0
- Closed
- is caused by
-
CONFSERVER-24320 Links and web images with URLs containing certain non-alphanumeric characters fail to save
- Closed
- is related to
-
CONFSERVER-52420 Links containing certain encoded special characters become double-encoded
- Closed
-
CONFSERVER-35200 Shortcut Links URLs are escaped improperly
- Gathering Impact
- relates to
-
CONFSERVER-46155 Character in hyperlink changed after save, from % to %25
- Closed