mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2063549 [lxml has split out lxml.html.clean into a separate project](https://bugs.launchpad.net/calibre/+bug/2063549)
This commit is contained in:
parent
63a3852c9f
commit
d68e11b2b9
@ -1,7 +1,10 @@
|
||||
# strip out a set of nuisance html attributes that can mess up rendering in RSS feeds
|
||||
import re
|
||||
|
||||
from lxml.html.clean import Cleaner
|
||||
try:
|
||||
from lxml_html_clean import Cleaner
|
||||
except ImportError:
|
||||
from lxml.html.clean import Cleaner
|
||||
|
||||
bad_attrs = ['width', 'height', 'style', '[-a-z]*color', 'background[-a-z]*', 'on*']
|
||||
single_quoted = "'[^']+'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user