mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion pipeline: Fix crash caused by empty <style> elements. Fixes #775277 (Private bug)
This commit is contained in:
parent
f9dabe9140
commit
804c5d001f
@ -216,7 +216,7 @@ class Stylizer(object):
|
|||||||
if t:
|
if t:
|
||||||
text += u'\n\n' + force_unicode(t, u'utf-8')
|
text += u'\n\n' + force_unicode(t, u'utf-8')
|
||||||
if text:
|
if text:
|
||||||
text = XHTML_CSS_NAMESPACE + elem.text
|
text = XHTML_CSS_NAMESPACE + text
|
||||||
text = oeb.css_preprocessor(text)
|
text = oeb.css_preprocessor(text)
|
||||||
stylesheet = parser.parseString(text, href=cssname)
|
stylesheet = parser.parseString(text, href=cssname)
|
||||||
stylesheet.namespaces['h'] = XHTML_NS
|
stylesheet.namespaces['h'] = XHTML_NS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user