mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-27 03:56:17 +01:00
Workaround for broken XHTML in some Washington Post articles
This commit is contained in:
parent
bb11c80871
commit
a5f13fa593
1 changed files with 7 additions and 0 deletions
|
|
@ -46,3 +46,10 @@ def postprocess_html(self, soup, first):
|
|||
div['style'] = ''
|
||||
return soup
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for tag in soup.findAll('font'):
|
||||
if tag.has_key('size'):
|
||||
if tag['size'] == '+2':
|
||||
if tag.b:
|
||||
return soup
|
||||
return None
|
||||
|
|
|
|||
Loading…
Reference in a new issue