mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Fix malformed values in the bgcolor attribute causing conversion to abort
This commit is contained in:
parent
cfed6ac42f
commit
3d47cf76fb
@ -356,7 +356,7 @@ class CSSFlattener(object):
|
||||
if 'bgcolor' in node.attrib:
|
||||
try:
|
||||
cssdict['background-color'] = Property('background-color', node.attrib['bgcolor']).value
|
||||
except ValueError:
|
||||
except (ValueError, SyntaxErr):
|
||||
pass
|
||||
del node.attrib['bgcolor']
|
||||
if cssdict.get('font-weight', '').lower() == 'medium':
|
||||
|
Loading…
x
Reference in New Issue
Block a user