emails: make sure newlines are stripped from subject (#57919)

This commit is contained in:
Frédéric Péters 2021-10-18 12:58:48 +02:00
parent f6e450c658
commit 838f601b50
1 changed files with 1 additions and 0 deletions

View File

@ -238,6 +238,7 @@ def email(
context['subject'] = mark_safe(subject)
subject = render_to_string('qommon/email_subject.txt', context).strip()
subject = subject.replace('\n', ' ') # make sure newlines are stripped
# handle action links/buttons
button_re = re.compile(r'---===BUTTON:(?P<token>[a-zA-Z0-9]*):(?P<label>.*?)===---')