summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-06-15 18:06:20 (GMT)
committerGuido van Rossum <guido@python.org>1999-06-15 18:06:20 (GMT)
commitb18448705501a5962ebd3946033fdc4b03cdf58a (patch)
treea8606eaf112f23c990b8dfb1faad29739343b047 /Lib
parent1e4402998f663d9d3df8239633aa97f0b02df9b5 (diff)
downloadcpython-b18448705501a5962ebd3946033fdc4b03cdf58a.zip
cpython-b18448705501a5962ebd3946033fdc4b03cdf58a.tar.gz
cpython-b18448705501a5962ebd3946033fdc4b03cdf58a.tar.bz2
Barry Scott writes:
Problem: rfc822.py in 1.5.2 final loses the quotes around quoted local-part names. The fix is to preserve the quotes around a local-part name in an address. Test: import rfc822 a = rfc822.AddrlistClass('(Comment stuff) "Quoted name"@somewhere.com') a.getaddrlist() The correct result is: [('Comment stuff', '"Quoted name"@somewhere.com')]
Diffstat (limited to 'Lib')
-rw-r--r--Lib/rfc822.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index 96a02d1..662703b 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -624,7 +624,7 @@ class AddrlistClass:
aslist.append('.')
self.pos = self.pos + 1
elif self.field[self.pos] == '"':
- aslist.append(self.getquote())
+ aslist.append('"%s"' % self.getquote())
elif self.field[self.pos] in self.atomends:
break
else: aslist.append(self.getatom())