On export, update in-content anchor links to not be non-http (#link) so anchors work within contained formats #1702

Open
opened 2026-02-05 01:39:53 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @techauthoruk on GitHub (May 4, 2020).

Describe the bug
If you export a book or page as a contained webpage, the table of contents correctly references the contained page, but any inline links point to the Bookstack hosted version.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Open a book that contains inline links
  2. Click on 'Export'
  3. Scroll down to 'Contained Web File'
  4. Open the generated file in your browser
  5. Select an inline link

Expected behavior
Inline links should point to the contained webpage

Screenshots
If applicable, add screenshots to help explain your problem.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.29.2
  • PHP Version: 7.2
  • Hosting Method (Nginx/Apache/Docker): Apache on Ubuntu 18.04

Additional context
Web browser if latest version of Firefox

Originally created by @techauthoruk on GitHub (May 4, 2020). **Describe the bug** If you export a book or page as a contained webpage, the table of contents correctly references the contained page, but any inline links point to the Bookstack hosted version. **Steps To Reproduce** Steps to reproduce the behavior: 1. Open a book that contains inline links 2. Click on 'Export' 3. Scroll down to 'Contained Web File' 4. Open the generated file in your browser 5. Select an inline link **Expected behavior** Inline links should point to the contained webpage **Screenshots** If applicable, add screenshots to help explain your problem. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.29.2 - PHP Version: 7.2 - Hosting Method (Nginx/Apache/Docker): Apache on Ubuntu 18.04 **Additional context** Web browser if latest version of Firefox
OVERLORD added the 🔨 Feature Request🚚 Export System labels 2026-02-05 01:39:53 +03:00
Author
Owner

@techauthoruk commented on GitHub (May 4, 2020):

Ah...brain not working today. Just realised that this only applies if the link is an entity link. If you manually code

[Custom foo description](#foo)

and place an anchor tag in the section

<a name="foo"></a>

Then all works as it should. Is there a way of automating this process when creating a contained webpage?

@techauthoruk commented on GitHub (May 4, 2020): Ah...brain not working today. Just realised that this only applies if the link is an entity link. If you manually code `[Custom foo description](#foo)` and place an anchor tag in the section `<a name="foo"></a>` Then all works as it should. Is there a way of automating this process when creating a contained webpage?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1702