Kaydet (Commit) 1346e83e authored tarafından Guido van Rossum's avatar Guido van Rossum

Patch 471400: escape single-dot lines; by Jason Hildebrand.

RFC 2049 recommends never outputting a line consisting of a single
dot.
üst 5aace07f
......@@ -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)
......
......@@ -180,6 +180,7 @@ Gary Herron
Bernhard Herzog
Magnus L. Hetland
Kevan Heydon
Jason Hildebrand
Konrad Hinsen
David Hobley
Tim Hochberg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment