confirmation: Remove newline replacement from email subjects.

I think it's fine to trust that we won't mess this up. I assume this is here
because it was copied from similar code in Django (e.g. see our code from
the password_reset flow), rather than because it was a problem in our
subject templates.
This commit is contained in:
Rishi Gupta
2017-04-29 23:51:32 -07:00
parent 326f9a8506
commit 04fb86fff7

View File

@@ -108,7 +108,7 @@ class ConfirmationManager(models.Manager):
if additional_context is not None:
context.update(additional_context)
subject = loader.get_template(template_prefix + '.subject').render(context).strip().replace(u'\n', u' ') # no newlines, please
subject = loader.get_template(template_prefix + '.subject').render(context).strip()
body = loader.get_template(template_prefix + '.txt').render(context)
try:
html_content = loader.get_template(template_prefix + '.html').render(context)