Fix #2856 (Greater than and less than symbols.)

This commit is contained in:
Kovid Goyal 2009-07-21 09:54:43 -06:00
parent eaccc173f2
commit cbf5566328

View File

@ -294,7 +294,7 @@ class MobiReader(object):
for pat in ENCODING_PATS:
self.processed_html = pat.sub('', self.processed_html)
e2u = functools.partial(entity_to_unicode,
exceptions=['lt', 'gt', 'amp', 'apos', 'quot'])
exceptions=['lt', 'gt', 'amp', 'apos', 'quot', '#60', '#62'])
self.processed_html = re.sub(r'&(\S+?);', e2u,
self.processed_html)
self.extract_images(processed_records, output_dir)