Fix #8646 (conversion of kindle format to epub fails ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes)

This commit is contained in:
Kovid Goyal 2011-01-29 09:28:13 -07:00
parent af6ce250b3
commit ac8ea5b16b

View File

@ -488,7 +488,7 @@ class MobiReader(object):
def remove_random_bytes(self, html):
return re.sub('\x14|\x15|\x19|\x1c|\x1d|\xef|\x12|\x13|\xec|\x08',
return re.sub('\x14|\x15|\x19|\x1c|\x1d|\xef|\x12|\x13|\xec|\x08|\x01|\x02|\x03|\x04|\x05|\x06|\x07',
'', html)
def ensure_unit(self, raw, unit='px'):