From f4ef7cbc5e27c187ce4f61c33b0187ab0d7f272b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 8 Nov 2019 08:12:37 +0000 Subject: [PATCH] [FW][FIX] mail: correctly format rejection email moderation content When an incoming email on a channel is rejected, an email is sent to the original author to inform him of the rejection. This email contains the original email content added in a generic rejection email. This original content was however considered as plaintext and escaped. Result was quite hard to read. As content is sanitized we can safely append it to the rejection email as valid html. Task ID 2121319 PR #39986 FW PR #39978 Signed-off-by: Thibault Delavallee (tde) --- addons/mail/models/mail_message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/models/mail_message.py b/addons/mail/models/mail_message.py index ae5d1c961f3..1262ccf8437 100644 --- a/addons/mail/models/mail_message.py +++ b/addons/mail/models/mail_message.py @@ -838,7 +838,7 @@ class Message(models.Model): else: email_from = self.env.company.catchall - body_html = tools.append_content_to_html('
%s
' % tools.ustr(comment), msg.body) + body_html = tools.append_content_to_html('
%s
' % tools.ustr(comment), msg.body, plaintext=False) vals = { 'subject': subject, 'body_html': body_html,