Skip to content

Commit

Permalink
[FIX] survey: Unescape characters in mail subject
Browse files Browse the repository at this point in the history
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: 37cea37
  • Loading branch information
adwid committed May 28, 2021
1 parent ee94964 commit 8d9d6aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/survey/wizard/survey_invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 8d9d6aa

Please sign in to comment.