commit | 661303f27e10abdb16450d96d8f55ac9c337246a | [log] [tgz] |
---|---|---|
author | R. David Murray <rdmurray@bitdance.com> | Tue Apr 13 20:57:40 2010 +0000 |
committer | R. David Murray <rdmurray@bitdance.com> | Tue Apr 13 20:57:40 2010 +0000 |
tree | a216b2f3874e5312680dc3fd0f4d703bda505260 | |
parent | b6705ac59cb3d0f23c95bbf783a954ad653eee24 [diff] [blame] |
Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters.
diff --git a/Lib/email/message.py b/Lib/email/message.py index 6adb3f6..993a1ac 100644 --- a/Lib/email/message.py +++ b/Lib/email/message.py
@@ -62,7 +62,7 @@ while s[:1] == ';': s = s[1:] end = s.find(';') - while end > 0 and s.count('"', 0, end) % 2: + while end > 0 and (s.count('"', 0, end) - s.count('\\"', 0, end)) % 2: end = s.find(';', end + 1) if end < 0: end = len(s)