mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
py3: Fix #1863160 [Wrong links in the converted azw3 file](https://bugs.launchpad.net/calibre/+bug/1863160)
This commit is contained in:
parent
6d4909978a
commit
14a803229f
@ -16,7 +16,7 @@ from lxml import etree
|
||||
from calibre import my_unichr
|
||||
from calibre.ebooks.oeb.base import XHTML_NS, extract
|
||||
from calibre.ebooks.mobi.utils import to_base, PolyglotDict
|
||||
from polyglot.builtins import iteritems, unicode_type
|
||||
from polyglot.builtins import iteritems, unicode_type, as_bytes
|
||||
|
||||
CHUNK_SIZE = 8192
|
||||
|
||||
@ -397,7 +397,7 @@ class Chunker(object):
|
||||
pos, fid = to_base(pos, min_num_digits=4), to_href(fid)
|
||||
return ':off:'.join((pos, fid)).encode('utf-8')
|
||||
|
||||
placeholder_map = {k:to_placeholder(v) for k, v in
|
||||
placeholder_map = {as_bytes(k):to_placeholder(v) for k, v in
|
||||
iteritems(self.placeholder_map)}
|
||||
|
||||
# Now update the links
|
||||
|
Loading…
x
Reference in New Issue
Block a user