From 30889c192540cba6e2aa2d071255158834324045 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 29 Jan 2010 23:00:23 +0100 Subject: Strip CR from text input. --- pastepy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3