]> granicus.if.org Git - python/commitdiff
decode_rfc2231(): We need to urllib.unquote() the value even if the
authorBarry Warsaw <barry@python.org>
Tue, 19 Aug 2003 03:49:34 +0000 (03:49 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 19 Aug 2003 03:49:34 +0000 (03:49 +0000)
charset and language fields are not present, e.g. as in:

    title*0="This%20is%20encoded"

Lib/email/Utils.py

index 2b8b94fec49b7cd0ba2b2af4c9d7e27fcb850107..a409e16e91616d43a71d80fb42d8d7b98d334440 100644 (file)
@@ -280,7 +280,7 @@ def decode_rfc2231(s):
     import urllib
     parts = s.split("'", 2)
     if len(parts) == 1:
-        return None, None, s
+        return None, None, urllib.unquote(s)
     charset, language, s = parts
     return charset, language, urllib.unquote(s)