mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #5662 (< hexa entity problem)
This commit is contained in:
parent
721b48038e
commit
a529cb0303
@ -14,8 +14,14 @@ XMLDECL_RE = re.compile(r'^\s*<[?]xml.*?[?]>')
|
|||||||
SVG_NS = 'http://www.w3.org/2000/svg'
|
SVG_NS = 'http://www.w3.org/2000/svg'
|
||||||
XLINK_NS = 'http://www.w3.org/1999/xlink'
|
XLINK_NS = 'http://www.w3.org/1999/xlink'
|
||||||
|
|
||||||
convert_entities = functools.partial(entity_to_unicode, exceptions=['quot',
|
convert_entities = functools.partial(entity_to_unicode,
|
||||||
'apos', 'lt', 'gt', 'amp', '#60', '#62'])
|
result_exceptions = {
|
||||||
|
u'<' : '<',
|
||||||
|
u'>' : '>',
|
||||||
|
u"'" : ''',
|
||||||
|
u'"' : '"',
|
||||||
|
u'&' : '&',
|
||||||
|
})
|
||||||
_span_pat = re.compile('<span.*?</span>', re.DOTALL|re.IGNORECASE)
|
_span_pat = re.compile('<span.*?</span>', re.DOTALL|re.IGNORECASE)
|
||||||
|
|
||||||
LIGATURES = {
|
LIGATURES = {
|
||||||
|
@ -787,7 +787,6 @@ class Manifest(object):
|
|||||||
data = self.oeb.decode(data)
|
data = self.oeb.decode(data)
|
||||||
data = self.oeb.html_preprocessor(data)
|
data = self.oeb.html_preprocessor(data)
|
||||||
|
|
||||||
|
|
||||||
# Remove DOCTYPE declaration as it messes up parsing
|
# Remove DOCTYPE declaration as it messes up parsing
|
||||||
# In particular, it causes tostring to insert xmlns
|
# In particular, it causes tostring to insert xmlns
|
||||||
# declarations, which messes up the coercing logic
|
# declarations, which messes up the coercing logic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user