-
Bug
-
Resolution: Fixed
-
Medium
-
4.3, 5.1.3, 5.1.4, 5.1.5
-
None
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
Symptoms
When a page name contains a special character, this character is included in the ID of any anchors on the page. When generating the URL for such anchors, Confluence is encoding any text to the right of the # using HTML entity escaping, but for this link to work, it must use URL encoding. This also happens if an anchor name contains a special character.
For example the apostrophe character:
- The URL is currently replacing it with '
- The URL should be replacing it instead with %27 like it does on the left side of the #
- The anchor is showing up correctly in the page source, as the apostrophe is not encoded inside the id attribute
Note that whilst using special characters in an ID is prohibited in XML and thus XHTML, it's perfectly fine for HTML5, which is used by Confluence, so any special characters do not need to be encoded inside the id attribute.
Steps to reproduce:
1. Create a page named "User's Resources"
2. Add an anchor to it, say "shares", a link to the anchor in the same page (or any other) and save
3. Click the link
4. No redirect is made (or if the link is in a different page, redirect is made only to the page, not the anchor)
This is the link:
<confluence_instance>/display/<space_name>/User%27s+Resources#User'sResources-shares
This behavior happens because of the special character used in the title - If the page is renamed without it, everything works.
Workaround
If this is caused by the page name, the only workaround is to rename that page to not have a special character.
If this is caused by the anchor name, you can work around this by manually URL-escaping the special character in the "Link" value in "Advanced" when creating the link.
- details
-
CONFSERVER-34818 Can not link to a heading that contains a colon (:)
- Closed
- has a regression in
-
CONFSERVER-37235 REGRESSION - Redirect to anchors in pages with titles that contain special characters is broken
- Gathering Impact
-
CONFSERVER-40039 Confluence anchor link redirection is broken with title containing double quote or colon or tab
- Gathering Impact
- is a regression of
-
CONFSERVER-24688 Special characters in anchor links are converted to HTML entities
- Closed
- is duplicated by
-
CONFSERVER-29943 TOC Macro does not work with certain characters in headline (FF, IE9, IE10)
- Closed
-
CONFSERVER-30151 Table of Contents: Links that contain ä ö ü - ( ) doesn't work (FireFox)
- Closed
-
CONFSERVER-30485 (In Firefox browser) Links in Table of Contents Macro not working when heading includes a question mark
- Closed
-
CONFSERVER-30573 Using a single quote on a heading causes the link in the TOC to not work
- Closed
-
CONFSERVER-27755 Can not link to a heading that contains a colon (:)
- Closed
-
CONFSERVER-28481 Anchor links are lost if page title contains certain special characters
- Closed
-
CONFSERVER-29186 Anchor Macro Feature doesn't Work with "Quotes" in the Title of the Page
- Closed
-
CONFSERVER-30482 special characters in a Header or Page-Title breaks corresponding 'Table of Contents' link
- Closed
- relates to
-
CONFCLOUD-26765 Redirect to anchors in pages with titles that contain special characters is broken
- Closed
-
CONFSERVER-30212 Using Images from pages containing special characters in their page title doesn't work
- Closed
-
CONFSERVER-32954 Use of the apostrophe in anchor causes linking issue
- Closed
- causes
-
TOC-157 Loading...
- mentioned in
-
Page Loading...
-
Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...