#7747: Long email subject headers have tab character inserted
--------------------------------------------------+-------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: new | Milestone: 1.0
Component: django.core.mail | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 1 |
--------------------------------------------------+-------------------------
Changes (by [EMAIL PROTECTED]):
* needs_tests: 1 => 0
Comment:
I updated that patch and added a test to regressionstest/mail to show the
problem.
The message method of EmailMessage creates an instance of SafeMIMEText
which overrides the default __setitem__ of MIMEText to always invoke
forbid_multi_line_headers on header assignment. So, at line 244 (247
patched), the assignment of the subject will cause
forbid_multi_line_headers() to be called and the patch will ensure that an
ascii subject header is returned as an instance of the Header class
instead of a unicode string. This, in turn, ensures that a space, not a
tab, is used as the continuation character if the subject line is long and
has to be folded over several lines (this is what the added test checks
for).
Prefering a space over a tab means that Outlook and Thunderbird will show
a long email subject correctly.
--
Ticket URL: <http://code.djangoproject.com/ticket/7747#comment:5>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django 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/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---