1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-01-06 11:14:12 +01:00

Removing is_py3 method and duplicated by urllib.

This commit is contained in:
2020-04-19 21:22:24 +02:00
parent b66cbd2c1e
commit ef7e2b10be
35 changed files with 267 additions and 254 deletions

View File

@@ -1,7 +1,7 @@
import re
import html.entities
from ebook_converter.polyglot.builtins import codepoint_to_chr
from ebook_converter.polyglot.html_entities import name2codepoint
from ebook_converter.constants import plugins, preferred_encoding
@@ -77,7 +77,8 @@ def unescape(text, rm=False, rchar=''):
else:
# named entity
try:
text = codepoint_to_chr(name2codepoint[text[1:-1]])
text = codepoint_to_chr(html.entities
.name2codepoint[text[1:-1]])
except KeyError:
pass
if rm: