summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-11-24 14:09:23 +0100
committerChristophe Simonis <chs@odoo.com>2016-11-24 14:18:09 +0100
commitb57eb754bfa3b6222ff5a5a691d3fe11684a50bf (patch)
tree3d6c2c5e2c397b1e0000295c0592bb8d07bf8aec
parent7e7205a7bfd5543f05808d71ae7ec8513d910079 (diff)
[FIX] core: ignore comments when clean html from emails
-rw-r--r--openerp/tools/mail.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openerp/tools/mail.py b/openerp/tools/mail.py
index 3714df9c56f..934d9c15b15 100644
--- a/openerp/tools/mail.py
+++ b/openerp/tools/mail.py
@@ -52,14 +52,14 @@ class _Cleaner(clean.Cleaner):
def __call__(self, doc):
# perform quote detection before cleaning and class removal
- for el in doc.iter():
+ for el in doc.iter(tag=etree.Element):
self.tag_quote(el)
super(_Cleaner, self).__call__(doc)
# if we keep style attribute, sanitize them
if not self.style:
- for el in doc.iter():
+ for el in doc.iter(tag=etree.Element):
self.parse_style(el)
def tag_quote(self, el):