summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-01-29 23:00:23 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-01-29 23:00:23 +0100
commit30889c192540cba6e2aa2d071255158834324045 (patch)
tree9d009ac8e23faadc8fd59eb21f59e47e262ff7e1
parent708125327434ec851100f2df1dbbaca241317b7f (diff)
Strip CR from text input.
-rw-r--r--pastepy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pastepy.py b/pastepy.py
index 67c2f44..f85b4fa 100644
--- a/pastepy.py
+++ b/pastepy.py
@@ -83,7 +83,7 @@ class Paste(object):
nick = mp['nick'].value.decode('utf8') or None
syntax = mp['syntax'].value.decode('utf8') or None
title = mp['title'].value.decode('utf8') or None
- text = mp['text'].value.decode('utf8') or None
+ text = mp['text'].value.decode('utf8').replace('\r', '') or None
hash = ''.join(random.choice(base62_alphabet) for x in xrange(5))