Bug Hunting Session
Bug 56595 - FILESAVE: ToC links broken in xhtml export - hrefs start with bogus './'
Summary: FILESAVE: ToC links broken in xhtml export - hrefs start with bogus './'
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:4.0.0
Depends on:
Reported: 2012-10-31 01:29 UTC by callow.mark
Modified: 2012-11-29 11:53 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description callow.mark 2012-10-31 01:29:15 UTC
The hrefs in the links in the Table of Contents of my exported HTML file all have the form


The './' prefix is bogus and causes the web browser to attempt to open the file #__RefHeading__56812_1229477905 at the base URL instead of going to the fragment in the same file.

This might be a duplicate of bug# 40097. However the problem description in 40097 is unclear.

I cannot attach the source file here because this is a public list, and I do not have permission to release the document publicly, but will be glad to send it to whoever works on this bug, if they need it. The source is a single .odt file.

This bug seems to have been inherited from OpenOffice.
Comment 1 callow.mark 2012-10-31 01:55:37 UTC
Change summary to match apparent convention.
Comment 2 callow.mark 2012-11-01 04:17:08 UTC
This happens in files created by File > Export > XHTML. A file created by File > Save As > HTML does not have this problem.
Comment 3 Not Assigned 2012-11-25 22:28:28 UTC
Peter Jentsch committed a patch related to this issue.
It has been pushed to "master":


fix fdo#56595 - FILESAVE: ToC links broken in xhtml export

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Comment 4 Peter Jentsch 2012-11-25 22:29:53 UTC
Fixed on master. fdo#40097 is unfortunately not resolved by this fix
Comment 5 callow.mark 2012-11-26 07:26:39 UTC
With the patch in comment #3, I confirm the latest build exports the document with a working ToC. Only two remaining defects prevent near perfect export: bugs 56598 and 57538.
Comment 6 Roman Eisele 2012-11-29 11:53:12 UTC
with LOdev (Build ID: 519c947f213ec69b0c92d3ea76193270644263e; pull time: 2012-11-28 04:07:39) on Mac OS X 10.6.8 (Intel).

The './' prefix is gone, the links work fine now.

@ Peter Jentsch :

Thank you for fixing this issue!