MOBI Output: Handle invalid height and width settings on <img> tags

This commit is contained in:
Kovid Goyal 2009-12-13 12:19:46 -07:00
parent b0ad8e00e4
commit 63a10e7753

View File

@ -356,7 +356,10 @@ class MobiMLizer(object):
if value == getattr(self.profile, prop):
result = '100%'
else:
ems = int(round(value / self.profile.fbase))
try:
ems = int(round(float(value) / self.profile.fbase))
except:
continue
result = "%dem" % ems
istate.attrib[prop] = result
elif tag == 'hr' and asfloat(style['width']) > 0: