[ python-Bugs-875646 ] email.Utils.formataddr doesn't handle whitespace too well

SourceForge.net noreply at sourceforge.net
Mon Jan 12 15:30:58 EST 2004


Bugs item #875646, was opened at 2004-01-12 20:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=875646&group_id=5470

Category: Python Library
Group: Python 2.2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthias Klose (doko)
Assigned to: Nobody/Anonymous (nobody)
Summary: email.Utils.formataddr doesn't handle whitespace too well

Initial Comment:
[forwarded from http://bugs.debian.org/178777]

originally reported for mailman, then reassigned to python

It seems like this problem is because
email.Utils.formataddr doesn't
handle newlines embedded in headers too well.

: tfheen at yiwaz ..man/mailman-2.1.3/Mailman > python
Python 2.3.3a0 (#2, Nov 21 2003, 00:36:53) 
[GCC 3.3.2 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> from email.Utils import formataddr
>>> formataddr(("Books is a list for discussing all
aspects of the audio\nand text boox",
'books at spanky.braille.uwo.ca')) 'Books is a list for
discussing all aspects of the audio\nand text boox
<books at spanky.braille.uwo.ca>'
>>> 

IMHO, it should either strip newlines or at least
insert a space in front of them so they aren't
interpreted as a new header.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=875646&group_id=5470



More information about the Python-bugs-list mailing list