Ebook-convert creates unreadable epub if there's a hash in the filename

Bug #1656833 reported by MarkG on 2017-01-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

If I use ebook-convert to create an epub from an HTML file with a # in the filename, I get messages like:

Removing fragment identifier u'1.html#toc0' from TOC as Adobe Digital Editions cannot handle it

The generated file fails epubcheck, and my iPhone can't open it. If I remove the # from the filename and run it again, it generates a valid file.

I'm using the version that came with Calibre 2.55 on Ubuntu.

Not a major bug, but took me a few hours to figure out why some files would convert with no problems and this particular file wouldn't.

I cannot replicate this with the current calibre release. Creating an
HTML file test#foo.html with the contents:
<!DOCTYPE html>
<html>
    <head>
        <title>test#moo</title>
        <meta charset="utf-8" />
    </head>
    <body>
        <h1>boo</h1>
        <p>hoo</p>
    </body>
</html>

and converting ti with ebook-convert results in a file that has no
errors as per epubcheck and filename related warnings during conversion.
I dont have an iPhone to test on, so I cannot say whether it will work
on one or not.

 status invalid

Kovid Goyal (kovid) wrote :

That said, I will change the HTML input to replace # in filenames with _
to be on the safe side.

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

 status fixreleased

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

Other bug subscribers