[FIX] core: ignore comments when clean html from emails

This commit is contained in:
Christophe Simonis
2016-11-24 14:18:09 +01:00
parent 7e7205a7bf
commit b57eb754bf
+2 -2
View File
@@ -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):