cpython/Lib/email
Barry Warsaw 18d2f39af7 decode_rfc2231(): Be more robust against buggy RFC 2231 encodings.
Specifically, instead of raising a ValueError when there is a single tick in
the parameter, simply return that the entire string unquoted, with None for
both the charset and the language.  Also, if there are more than 2 ticks in
the parameter, interpret the first three parts as the standard RFC 2231 parts,
then the rest of the parts as the encoded string.

Test cases added.

Original fewer-than-3-parts fix by Tokio Kikuchi.

Resolves SF bug # 1218081.  I will back port the fix and tests to Python 2.4
(email 3.0) and Python 2.3 (email 2.5).

Also, bump the version number to email 4.0.1, removing the 'alpha' moniker.
2006-07-17 23:07:51 +00:00
..
mime Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
test decode_rfc2231(): Be more robust against buggy RFC 2231 encodings. 2006-07-17 23:07:51 +00:00
__init__.py decode_rfc2231(): Be more robust against buggy RFC 2231 encodings. 2006-07-17 23:07:51 +00:00
_parseaddr.py Port forward from 2.4 branch: 2006-05-01 03:03:02 +00:00
base64mime.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
charset.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
encoders.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
errors.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
feedparser.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
generator.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
header.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
iterators.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
message.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
parser.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
quoprimime.py Merge email package 4.0 from the sandbox, including documentation, test cases, 2006-03-18 15:41:53 +00:00
utils.py decode_rfc2231(): Be more robust against buggy RFC 2231 encodings. 2006-07-17 23:07:51 +00:00