Code

Ticket #7747: tabs_in_subject_line_fix.2.diff

File tabs_in_subject_line_fix.2.diff, 452 bytes (added by mark.allison@…, 6 years ago)

Updated, slightly cleaner, workaround for tabs in email subject headers

Line 
1Index: django/core/mail.py
2===================================================================
3--- django/core/mail.py (revision 7922)
4+++ django/core/mail.py (working copy)
5@@ -85,6 +85,9 @@
6             val = ', '.join(result)
7         else:
8             val = Header(force_unicode(val), settings.DEFAULT_CHARSET)
9+    else:
10+        if name.lower() == 'subject':
11+            val = Header(val)
12     return name, val
13 
14 class SafeMIMEText(MIMEText):