Code

Ticket #7747: tabs_in_subject_line_fix.diff

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

Workaround for tab insertion in long email subject lines

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,8 @@
6             val = ', '.join(result)
7         else:
8             val = Header(force_unicode(val), settings.DEFAULT_CHARSET)
9+    if isinstance(val, str) and name.lower() == 'subject':
10+        val = Header(val)
11     return name, val
12 
13 class SafeMIMEText(MIMEText):