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
  • Loading branch information
adwid committed May 26, 2021
1 parent 3317249 commit 40b6074
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 @@ -196,7 +196,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.template']._render_template(self.subject, 'survey.user_input', answer.id, post_process=True)
subject = self.env['mail.template'].with_context(safe=True)._render_template(self.subject, 'survey.user_input', answer.id, post_process=True)
body = self.env['mail.template']._render_template(self.body, 'survey.user_input', answer.id, post_process=True)
# post the message
mail_values = {
Expand Down

0 comments on commit 40b6074

Please sign in to comment.