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

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

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1656833

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

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

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

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: New → Invalid
status: Invalid → 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.