mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
AZW3 input: Put internal links into quotes to avoid parse errors when tweaking
This commit is contained in:
parent
95ed2862a6
commit
c7aa9c78fb
1 changed files with 2 additions and 1 deletions
|
|
@ -45,7 +45,8 @@ def update_internal_links(mobi8_reader, log):
|
|||
suffix = (b'#' + idtag) if idtag else b''
|
||||
replacement = filename.split('/')[-1].encode(
|
||||
mr.header.codec) + suffix
|
||||
tag = posfid_index_pattern.sub(replacement, tag, 1)
|
||||
replacement = replacement.replace(b'"', b'"')
|
||||
tag = posfid_index_pattern.sub(b'"' + replacement + b'"', tag, 1)
|
||||
srcpieces[j] = tag
|
||||
raw = b''.join(srcpieces)
|
||||
parts.append(raw.decode(mr.header.codec))
|
||||
|
|
|
|||
Loading…
Reference in a new issue