diff --git a/talon/html_quotations.py b/talon/html_quotations.py index e903b69..735f189 100644 --- a/talon/html_quotations.py +++ b/talon/html_quotations.py @@ -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 \ No newline at end of file diff --git a/talon/quotations.py b/talon/quotations.py index 9ce3b25..4687f8f 100644 --- a/talon/quotations.py +++ b/talon/quotations.py @@ -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