Fix #2193 (PRS-700 epub flow_size crash)

This commit is contained in:
Kovid Goyal 2009-04-02 11:07:49 -07:00
parent 9eceea4762
commit 62688a6822

View File

@ -208,6 +208,10 @@ class HTMLProcessor(Processor, Rationalizer):
for tag in self.root.xpath('//table | //tr | //th | //td'): for tag in self.root.xpath('//table | //tr | //th | //td'):
tag.tag = 'div' tag.tag = 'div'
# ADE can't handle & in an img url
for tag in self.root.xpath('//img[@src]'):
tag.set('src', tag.get('src', '').replace('&', ''))
def save(self): def save(self):
for meta in list(self.root.xpath('//meta')): for meta in list(self.root.xpath('//meta')):