TOC links don't work for headings when they include line breaks as part of the content set as heading

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      When some page content is formatted as a heading, but its selection includes line-breaks, the Table of Contents (TOC) will generate the links with the word "hardbreak" as part of it.

      The break can happen before or after the actual content and, by checking the Storage Format for the page, we will see something like:

       

      <h2><br />My Heading2 Title</h2>
      <h2 local-id="a123456">Another Broken Link in TOC<br /><br /></h2>
      
      
      

      In the TOC, those <br/> tags will be replaced with "%5BhardBreak%5D" in the link and will not work to scroll the page to the target section.

       

      Steps to Reproduce

      1. Select additional linebreaks when making some Headings
      2. Add a TOC to the page
      3. Try to click the link to the heading with breaks

      Expected Results

      Page scrolls to the target section

      Actual Results

      Nothing happens as the link is invalid

      Workaround

      For the moment, the only workaround it manually editing the page, converting the affected section (item appearing in the TOC link) to a regular Paragraph and then reselect the text to make it the respective Heading (1,2,3 etc).

              Assignee:
              Unassigned
              Reporter:
              Rodrigo Bozza (Atlassian)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: