Non breaking spaces in titles can result in words combining in page nav #4456

Closed
opened 2026-02-05 08:55:47 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @WyattBest on GitHub (Feb 8, 2024).

Describe the Bug

Using <code> tags in a header looks fine on the page but causes a problem in the sidebar navigation. Specifically, whitespace is lost.

image
image

Steps to Reproduce

  1. Use markdown like <h5 id="bkmrk-why%C2%A0void%3F">Why&nbsp;<code>void</code>?</h5> in a page.
  2. Save the page.

Example: https://resource.reworkflow.com/books/slate/page/birth-fields-on-custom-per-page#bkmrk-why%C2%A0void%3F

Expected Behaviour

Space between regular text and text should remain in the nav link.

Screenshots or Additional Context

Any space between regular text and text is lost in the nav link.

Browser Details

Firefox 122.0 on Windows 10

Exact BookStack Version

v23.12

Originally created by @WyattBest on GitHub (Feb 8, 2024). ### Describe the Bug Using `<code>` tags in a header looks fine on the page but causes a problem in the sidebar navigation. Specifically, whitespace is lost. ![image](https://github.com/BookStackApp/BookStack/assets/32881391/2cb3f67b-9a1c-4a2c-ae41-4f09edf91ba8) ![image](https://github.com/BookStackApp/BookStack/assets/32881391/30a05425-8285-487c-8df1-086c9b3594d5) ### Steps to Reproduce 1. Use markdown like `<h5 id="bkmrk-why%C2%A0void%3F">Why&nbsp;<code>void</code>?</h5>` in a page. 2. Save the page. Example: https://resource.reworkflow.com/books/slate/page/birth-fields-on-custom-per-page#bkmrk-why%C2%A0void%3F ### Expected Behaviour Space between regular text and <code>text</code> should remain in the nav link. ### Screenshots or Additional Context Any space between regular text and <code>text</code> is lost in the nav link. ### Browser Details Firefox 122.0 on Windows 10 ### Exact BookStack Version v23.12
OVERLORD added the 🐛 Bug label 2026-02-05 08:55:47 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 9, 2024):

Thanks for reporting @WyattBest,
This has now been addressed in 77f125208e, to be part of the next patch release.

From what I could tell, this was unrelated to the use of <code>, but specific to handling &nbsp; hence the update to the issue title.

@ssddanbrown commented on GitHub (Mar 9, 2024): Thanks for reporting @WyattBest, This has now been addressed in 77f125208ed281912bb6ae9d57abe7b4b26df4c6, to be part of the next patch release. From what I could tell, this was unrelated to the use of `<code>`, but specific to handling `&nbsp;` hence the update to the issue title.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4456