mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
ODT Input: CSS rationalization should not fail with non ascii class names
This commit is contained in:
parent
fe540ef887
commit
3ac697f8e0
@ -74,7 +74,10 @@ class Extract(ODF2XHTML):
|
||||
style = style[0]
|
||||
css = style.text
|
||||
if css:
|
||||
style.text, sel_map = self.do_filter_css(css)
|
||||
css, sel_map = self.do_filter_css(css)
|
||||
if not isinstance(css, unicode):
|
||||
css = css.decode('utf-8', 'ignore')
|
||||
style.text = css
|
||||
for x in root.xpath('//*[@class]'):
|
||||
extra = []
|
||||
orig = x.get('class')
|
||||
|
Loading…
x
Reference in New Issue
Block a user