Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 5 by carl.j.meyer: get rid of newlines in email subject
http://code.google.com/p/django-email-confirmation/issues/detail?id=5

In line 100 of models.py, a template is rendered to create the subject line
of the confirmation email.  Since it's easy to get a final newline in a
template file without intending to, it would be more robust if this line of
code stripped any newlines in the rendered template.  The following patch
takes care of it:

Index: devproject/emailconfirmation/models.py
===================================================================
--- devproject/emailconfirmation/models.py      (revision 40)
+++ devproject/emailconfirmation/models.py      (working copy)
@@ -97,7 +97,7 @@
              "current_site": current_site,
              "confirmation_key": confirmation_key,
          }
-        subject =
render_to_string("emailconfirmation/email_confirmation_subject.txt",  
context)
+        subject = '
'.join(render_to_string("emailconfirmation/email_confirmation_subject.txt",
context).splitlines())
          message =
render_to_string("emailconfirmation/email_confirmation_message.txt",  
context)
          send_mail(subject, message, settings.DEFAULT_FROM_EMAIL,
[email_address.email], priority="high")


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to