From b84a0ad88b5c753945bc4a1091a0194e9b3e1fbb Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Fri, 4 Sep 2015 23:24:35 +0200 Subject: [PATCH] [IMP] check if we have an lxml with the upstream patch applied --- web_ckeditor4/models/ckeditor_monkeypatch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_ckeditor4/models/ckeditor_monkeypatch.py b/web_ckeditor4/models/ckeditor_monkeypatch.py index 89de275a..688b0ee4 100644 --- a/web_ckeditor4/models/ckeditor_monkeypatch.py +++ b/web_ckeditor4/models/ckeditor_monkeypatch.py @@ -29,7 +29,8 @@ class CkeditorMonkeypatch(models.AbstractModel): def _register_hook(self, cr): 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 if hasattr(clean, '_is_javascript_scheme'): # this is the case in lxml >= 3.3