-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Macros - Table of Contents
-
None
-
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
- Select additional linebreaks when making some Headings
- Add a TOC to the page
- 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).