Added Zimbra HTML quotation extraction
This commit is contained in:
@@ -195,3 +195,9 @@ def cut_from_block(html_message):
|
||||
block.getparent().remove(block.getnext())
|
||||
block.getparent().remove(block)
|
||||
return True
|
||||
|
||||
def cut_zimbra_quote(html_message):
|
||||
zDivider = html_message.xpath('//hr[@data-marker="__DIVIDER__"]')
|
||||
if zDivider:
|
||||
zDivider[0].getparent().remove(zDivider[0])
|
||||
return True
|
||||
@@ -350,6 +350,7 @@ def extract_from_html(msg_body):
|
||||
parser=html.HTMLParser(encoding="utf-8")
|
||||
)
|
||||
cut_quotations = (html_quotations.cut_gmail_quote(html_tree) or
|
||||
html_quotations.cut_zimbra_quote(html_tree) or
|
||||
html_quotations.cut_blockquote(html_tree) or
|
||||
html_quotations.cut_microsoft_quote(html_tree) or
|
||||
html_quotations.cut_by_id(html_tree) or
|
||||
|
||||
Reference in New Issue
Block a user