mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-24 22:36:11 +01:00
ODT Input: CSS rationalization should not fail with non ascii class names
This commit is contained in:
parent
fe540ef887
commit
3ac697f8e0
1 changed files with 4 additions and 1 deletions
|
|
@ -74,7 +74,10 @@ def filter_css(self, root, log):
|
|||
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…
Reference in a new issue