comparison roundup/rfc2822.py @ 3639:97f9fc0bc0ea

Yet another rfc2822 encoding patch: '?' must be escaped. Fixes [SF#1505663] "'?' in rfc2822-encoded header isn't quoted +patch"
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Sat, 15 Jul 2006 10:11:09 +0000
parents 0c34f5a116ef
children
comparison
equal deleted inserted replaced
3638:22ec8e91da2b 3639:97f9fc0bc0ea
139 for c in header: 139 for c in header:
140 # Space may be represented as _ instead of =20 for readability 140 # Space may be represented as _ instead of =20 for readability
141 if c == ' ': 141 if c == ' ':
142 quoted += '_' 142 quoted += '_'
143 # These characters can be included verbatim 143 # These characters can be included verbatim
144 elif hqre.match(c) and c not in '_=': 144 elif hqre.match(c) and c not in '_=?':
145 quoted += c 145 quoted += c
146 # Otherwise, replace with hex value like =E2 146 # Otherwise, replace with hex value like =E2
147 else: 147 else:
148 quoted += "=%02X" % ord(c) 148 quoted += "=%02X" % ord(c)
149 plain = 0 149 plain = 0

Roundup Issue Tracker: http://roundup-tracker.org/