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

Table of Contents' links broken if Headers/Anchors contain special unicode characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 5.2.5
    • 5.1.4, 5.2.3
    • None

    Description

      Steps to Reproduce:

      1. Create a page in Confluence 5.1.4
      2. Add the following headers to the page:
        • исия
        • sdこんにちは
        • assadsadas
      3. Add the TOC macro into the page

      Notice that the link in the TOC macro is encoded, like this (for headers with special unicode characters only):

      <a href="#sdfsdf-%D0%B8%D1%81%D0%B8%D1%8F">
            исия
          </a>
      

      Note

      This seems to occur only in Confluence 5.1.4 (5.1.2 does not exhibit the same behavior).

      Problem seems to be caused by this in AbstractPageLink.generateAnchorForURL():

      return GeneralUtil.urlEncode(HtmlElementIdCreator.convertToIdHtml5(prefix + anchor));
      

      Manually updating it to this fixes the issue:

       return HtmlElementIdCreator.convertToIdHtml5(prefix + anchor);
      

      Chrome works fine despite the encoded URL link.

      Attachments

        Issue Links

          Activity

            People

              fsim Foo Sim (Inactive)
              fsim Foo Sim (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: