Some links fail to convert from kf8 to epub

Bug #1341306 reported by Tyler Spivey on 2014-07-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

Calibre 1.44 32-bit on windows 8.1 x64.
If I try to convert a kf8 mobi with an embedded anchor, e.g.:
<a href="#chapter1">Chapter 1</a>
and the anchor is defined like:
<a NAME="chapter1"/> (where NAME is uppercase),
the link fails to convert when converting the book. It just goes to the beginning of the first file.
Attached is an example mobi I created that will reproduce this bug.
Converting it to epub (with ebook-convert test.mobi .epub) will retarget the links to part0000_split_000.html.

Tyler Spivey (tspivey) wrote :
Tyler Spivey (tspivey) wrote :

Checking every single attribute in every single file when converting for
non-lowercase attribute names is a prohibitive performance penalty. If
you insist on using HTML with uppercase attributes as you source, then
make sure that the html tag is also uppercase (i.e. use <HTML>), in
which case the conversion will work, otherwise it will not.

And looking at your sample, you appear to be generating your file via
OpenOffice's HTML export. Dont do that, OpenOffice's HTML export is
horrible. Save the file as docx (preferably) or odt and convert that.

 status wontfix

Changed in calibre:
status: New → Won't Fix
Kovid Goyal (kovid) wrote :

On second thoughts, since the HTML you are using uses an HTML 4.0
DOCTYPE I can have calibre do the lowercasing when it sees the HTML 4.0
doctype in addition to when the <HTML> tag is uppercse. That should be a
smaller performance penalty and it will fix the conversion of your file.

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers