email bug?

Stuart D. Gathman stuart at
Sat Aug 23 22:02:48 CEST 2003

Running the following with Python 2.2.2:

from email.Parser import Parser

txt = """Subject: IE is Evil
Content-Type: image/pjpeg; name="Jim&&Jill"


msg = email.message_from_string(txt)
print msg.get_params()

I get:
[('image/pjpeg', ''), ('name', '"Jim&amp'), ('&amp', ''), ('Jill"', '')]

What IE apparently gets is:

[('image/pjpeg', ''), ('name', '"Jim&&Jill"')]

Is this a bug (in the email package, I mean - obviously IE is buggy)?

Do I have to write my own custom param parsing routines to handle this?

	      Stuart D. Gathman <stuart at>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

More information about the Python-list mailing list