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

Anchor links are lost if page title contains certain special characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • None
    • 4.3.5, 4.3.7, 5.0.1
    • None

    Description

      Steps to Reproduce

      1. Create a page with title åê
      2. Insert the following Wiki Markup to the page:
        {toc}
        
        h1. Heading 1
        {loremipsum}
        {loremipsum}
        
        h1. Heading 2
        {loremipsum}
        
        h1. Heading 3
        {loremipsum}
        
      3. Save the page
      4. Copy the link of "Heading 2" from the Table of Contents macro, which should be in the following format:
        http://<confluence-url>/pages/viewpage.action?pageId=<contentID>#id-åê-Heading2

      5. Create a new page titled "Test"
      6. Paste the copied link into the editor and then save the page
      7. Click on the link

      Expected Results

      When the page åê loads, it should point to the correct anchor heading (i.e. "Heading 2").

      Actual Results

      The page does NOT point to the correct anchor heading (it shows the content as if the anchor is not defined/incorrect)

      Environment Information

      Tested on Confluence 4.3.5, 4.3.7, 5.0.1 using Chrome

      Findings

      When the link is pasted into the editor, the XHTML code is:

      Unable to find source-code formatter for language: xhtml. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
        <ac:link ac:anchor="åê-Heading2">
          <ri:page ri:content-title="åê"/>
        </ac:link>
      

      This is wrong. The anchor name should be without åê-:

      Unable to find source-code formatter for language: xhtml. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
        <ac:link ac:anchor="Heading2">
          <ri:page ri:content-title="åê"/>
        </ac:link>
      

      NOTE: This issue does not occur when the source page does not include special characters.

      Workaround

      1. Instead of pasting the link directly into the editor, click the "Link" icon instead and under "Web Link", paste the link into the text box
      2. Edit the link and change it from
        &aring;&ecirc;#&aring;&ecirc;-Heading2

        to

        &aring;&ecirc;#Heading2

        This means that the characters between # and - need to be deleted (including the - character).

      3. Edit the anchor name using the Source Code Editor

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asanusi AmaliaA
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: