3
0
Fork 0

[IMP] check if we have an lxml with the upstream

patch applied
8.0
Holger Brunn 2015-09-04 23:24:35 +02:00
parent d6a8d7c786
commit b84a0ad88b
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ class CkeditorMonkeypatch(models.AbstractModel):
def _register_hook(self, cr): def _register_hook(self, cr):
marker = self._name.replace('.', '_') marker = self._name.replace('.', '_')
if not hasattr(clean, marker): if not hasattr(clean, marker) \
and not hasattr(clean, '_is_image_dataurl'):
# monkey patch lxml's html cleaner to allow image data urls # monkey patch lxml's html cleaner to allow image data urls
if hasattr(clean, '_is_javascript_scheme'): if hasattr(clean, '_is_javascript_scheme'):
# this is the case in lxml >= 3.3 # this is the case in lxml >= 3.3