email bug?

Stuart D. Gathman stuart at bmsi.com
Sat Aug 23 16:02:48 EDT 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"

<html>
</html>
"""

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 bmsi.com>
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