Anchor Macro: ">" character duplicated in inline link href when anchor name contains angle brackets (<>)

XMLWordPrintable

    • Minor

      Issue Summary

      When an anchor macro's name contains angle bracket characters (< and >), the ">" character gets duplicated in the href of inline links referencing that anchor. This is caused by improper HTML encoding in the AnchorMacro's rendered output, which corrupts the DOM and causes the editor to persist an incorrect href.

      Steps to Reproduce

      • 1. Create a Confluence page
      • 2. Insert an Anchor macro with the name: /OPE/PCN_UFI_PARAM_CKD_<SID>_<CLT>
      • 3. On the same page, create an inline link referencing this anchor
      • 4. View the page and inspect the storage format

      Expected Results

      The inline link href fragment should be:

      #/OPE/PCN_UFI_PARAM_CKD_%3CSID%3E_%3CCLT%3E

      (URL-decoded: <SID>_<CLT> — single > after SID)

      Actual Results

      The inline link href fragment is:

      #/OPE/PCN_UFI_PARAM_CKD_%3CSID%3E%3E_%3CCLT%3E

      (URL-decoded: <SID>>_<CLT> — doubled > after SID)

      The extra ">" is also visible in the rendered inline link text.

      Workaround

      Avoid using < and > characters in anchor names

              Assignee:
              Unassigned
              Reporter:
              Abhinay Nigam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: