Some links fail to convert from kf8 to epub

Bug #1341306 reported by Tyler Spivey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
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.

Revision history for this message
Tyler Spivey (tspivey) wrote :
Revision history for this message
Tyler Spivey (tspivey) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1341306

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
Revision history for this message
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.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.