]> granicus.if.org Git - python/commitdiff
Patch 471400: escape single-dot lines; by Jason Hildebrand.
authorGuido van Rossum <guido@python.org>
Mon, 15 Oct 2001 18:44:26 +0000 (18:44 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 15 Oct 2001 18:44:26 +0000 (18:44 +0000)
RFC 2049 recommends never outputting a line consisting of a single
dot.

Lib/quopri.py
Misc/ACKS

index 6d7cdd613fd71392961836388637bfe1117d7f24..edee3d991604f324b46cb94a8be9a8c5c441562d 100755 (executable)
@@ -61,6 +61,8 @@ def encode(input, output, quotetabs, header = 0):
         # that trailing character encoded.
         if s and s[-1:] in ' \t':
             output.write(s[:-1] + quote(s[-1]) + lineEnd)
+        elif s == '.':
+            output.write(quote(s) + lineEnd)
         else:
             output.write(s + lineEnd)
 
index 6569766ea999b8e57978274708befde675a6c793..f09e77c84c6437966f2d60b4a1d7fe66deee9160 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -180,6 +180,7 @@ Gary Herron
 Bernhard Herzog
 Magnus L. Hetland
 Kevan Heydon
+Jason Hildebrand
 Konrad Hinsen
 David Hobley
 Tim Hochberg