[issue795081] email.Message param parsing problem II
Tony Nelson
report at bugs.python.org
Mon Mar 3 04:47:14 CET 2008
Tony Nelson added the comment:
If I understand RFC2822 3.2.2. Quoted characters (heh), unquoting must
be done in one pass, so the current replace().replace() is wrong. It
will change '\\"' to '"', but it should become '\"' when unquoted.
This seems to work:
re.sub(r'\\(.)',r'\1',s)
I haven't encountered a problem with this; I just came across it while
looking at the file Utils.py (Python 2.4, but unchanged in trunk). I
will submit a new bug if desired.
----------
nosy: +tony_nelson
____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue795081>
____________________________________
More information about the Python-bugs-list
mailing list