[extensions-web] review: Remove custom newline replacement code



commit 51800fe2ffe9e83562fd283a306e85109da89ba5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Apr 1 22:57:31 2012 -0400

    review: Remove custom newline replacement code
    
    Django already checks for and forbids multi-line headers, so we don't
    need to do that here.

 sweettooth/review/views.py |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index 4b36ed4..d7136f3 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -316,11 +316,7 @@ def send_email_on_submitted(sender, request, version, **kwargs):
                 extension=extension,
                 url=url)
 
-    subject = render_to_string('review/submitted_mail_subject.txt', data, Context(autoescape=False))
-    subject = subject.strip()
-    subject = subject.replace('\n', '')
-    subject = subject.replace('\r', '')
-
+    subject = render_to_string('review/submitted_mail_subject.txt', data, Context(autoescape=False)).strip()
     body = render_to_string('review/submitted_mail.txt', data, Context(autoescape=False)).strip()
 
     recipient_list = get_all_reviewers().values_list('email', flat=True)
@@ -344,11 +340,7 @@ def send_email_on_reviewed(sender, request, version, review, **kwargs):
                 review=review,
                 url=url)
 
-    subject = render_to_string('review/reviewed_mail_subject.txt', data, Context(autoescape=False))
-    subject = subject.strip()
-    subject = subject.replace('\n', '')
-    subject = subject.replace('\r', '')
-
+    subject = render_to_string('review/reviewed_mail_subject.txt', data, Context(autoescape=False)).strip()
     body = render_to_string('review/reviewed_mail.txt', data, Context(autoescape=False)).strip()
 
     recipient_list = list(version.reviews.values_list('reviewer__email', flat=True).distinct())



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]