From 8d9d6aad218ad55f8b699a8397b68f382acf9a50 Mon Sep 17 00:00:00 2001 From: Adrien Widart Date: Tue, 25 May 2021 14:35:33 +0000 Subject: [PATCH] [FIX] survey: Unescape characters in mail subject To reproduce the error: Create a survey (title must contain ") and send it Error: The mail subject is incorrect: the character " is replaced with " OPW-2536206 X-original-commit: 37cea376cc2069388b07b91f50caa6044fa6c932 --- addons/survey/wizard/survey_invite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/survey/wizard/survey_invite.py b/addons/survey/wizard/survey_invite.py index 5561a6a455138..48cfabb8f263c 100644 --- a/addons/survey/wizard/survey_invite.py +++ b/addons/survey/wizard/survey_invite.py @@ -210,7 +210,7 @@ def _get_answers_values(self): def _send_mail(self, answer): """ Create mail specific for recipient containing notably its access token """ - subject = self.env['mail.render.mixin']._render_template(self.subject, 'survey.user_input', answer.ids, post_process=True)[answer.id] + subject = self.env['mail.render.mixin'].with_context(safe=True)._render_template(self.subject, 'survey.user_input', answer.ids, post_process=True)[answer.id] body = self.env['mail.render.mixin']._render_template(self.body, 'survey.user_input', answer.ids, post_process=True)[answer.id] # post the message mail_values = {