[FIX] core: ignore comments when clean html from emails
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user