mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1681. Handle HTML "style" attributes which begin with a ";".
This commit is contained in:
parent
ff5398c435
commit
6cc4432cb7
@ -277,7 +277,10 @@ class Style(object):
|
||||
def _apply_style_attr(self):
|
||||
attrib = self._element.attrib
|
||||
if 'style' in attrib:
|
||||
style = CSSStyleDeclaration(attrib['style'])
|
||||
css = attrib['style'].strip()
|
||||
if css.startswith(';'):
|
||||
css = css[1:]
|
||||
style = CSSStyleDeclaration(css)
|
||||
self._style.update(self._stylizer.flatten_style(style))
|
||||
|
||||
def _has_parent(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user