mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix #2081067 [Error opening books](https://bugs.launchpad.net/calibre/+bug/2081067)
This commit is contained in:
parent
3e31324312
commit
cb07b649f2
@ -9,7 +9,6 @@ import re
|
||||
import html5_parser
|
||||
from lxml.etree import Element as LxmlElement
|
||||
|
||||
from calibre import xml_replace_entities
|
||||
from calibre.ebooks.chardet import strip_encoding_declarations, xml_to_unicode
|
||||
from calibre.utils.cleantext import clean_xml_chars
|
||||
from calibre.utils.xml_parse import safe_xml_fromstring
|
||||
@ -18,7 +17,8 @@ try:
|
||||
from calibre_extensions.fast_html_entities import replace_all_entities
|
||||
except ImportError:
|
||||
def replace_all_entities(raw, keep_xml_entities: bool = False):
|
||||
xml_replace_entities(raw)
|
||||
from calibre import xml_replace_entities
|
||||
return xml_replace_entities(raw)
|
||||
|
||||
XHTML_NS = 'http://www.w3.org/1999/xhtml'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user