MOBI Input: Strip <street> and <address> tags as ADE refuses to hadle them gracefully when converted to EPUB

This commit is contained in:
Kovid Goyal 2009-03-10 12:56:47 -07:00
parent 8ea72440c8
commit 72581c6e32

View File

@ -300,7 +300,7 @@ class MobiReader(object):
mobi_version = self.book_header.mobi_version mobi_version = self.book_header.mobi_version
for tag in root.iter(etree.Element): for tag in root.iter(etree.Element):
if tag.tag in ('country-region', 'place', 'placetype', 'placename', if tag.tag in ('country-region', 'place', 'placetype', 'placename',
'state', 'city'): 'state', 'city', 'street', 'address'):
tag.tag = 'span' tag.tag = 'span'
for key in tag.attrib.keys(): for key in tag.attrib.keys():
tag.attrib.pop(key) tag.attrib.pop(key)