1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-02-16 14:05:56 +01:00

Removed urlunquote

This commit is contained in:
2020-07-11 16:24:16 +02:00
parent 5fb02998a1
commit c82c4e456c
7 changed files with 29 additions and 40 deletions

View File

@@ -4,7 +4,6 @@ import shutil
import urllib.parse
import uuid
from ebook_converter import constants as const
from ebook_converter.ebooks.oeb import base
from ebook_converter.ebooks.oeb import parse_utils
from ebook_converter.customize.conversion import OutputFormatPlugin
@@ -390,7 +389,7 @@ class EPUBOutput(OutputFormatPlugin):
href = getattr(node, 'href', None)
if hasattr(href, 'partition'):
_base, _, frag = href.partition('#')
frag = base.urlunquote(frag)
frag = urllib.parse.unquote(frag)
if frag and frag_pat.match(frag) is None:
self.log.warn(
'Removing fragment identifier %r from TOC as Adobe Digital Editions cannot handle it'%frag)