OEBBook: remove invalid links.

This commit is contained in:
John Schember 2009-07-31 08:29:05 -04:00
parent 32192a5a72
commit 1a01daab1b

View File

@ -904,6 +904,12 @@ class Manifest(object):
if key == 'lang' or key.endswith('}lang'):
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
def _parse_txt(self, data):