mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
OEBBook: remove invalid links.
This commit is contained in:
parent
32192a5a72
commit
1a01daab1b
@ -904,6 +904,12 @@ class Manifest(object):
|
|||||||
if key == 'lang' or key.endswith('}lang'):
|
if key == 'lang' or key.endswith('}lang'):
|
||||||
body.attrib.pop(key)
|
body.attrib.pop(key)
|
||||||
|
|
||||||
|
# Remove invalid links as they casue overflow until the next link
|
||||||
|
# in rendering.
|
||||||
|
data = etree.tostring(data)
|
||||||
|
data = re.sub('<a[^/]*?/>', '', data)
|
||||||
|
data = etree.fromstring(data)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def _parse_txt(self, data):
|
def _parse_txt(self, data):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user