chiark / gitweb /
trim \n from tweet texts
authorMatthew Vernon <matthewv@chiark.greenend.org.uk>
Thu, 23 Jun 2011 11:39:39 +0000 (12:39 +0100)
committerMatthew Vernon <matthewv@chiark.greenend.org.uk>
Thu, 23 Jun 2011 11:39:39 +0000 (12:39 +0100)
commands.py

index 114f7b0..f323b00 100644 (file)
@@ -413,6 +413,7 @@ def getTweet(urlstring,twitapi):
     tweeter_screen = status.user.screen_name.encode('UTF-8', 'replace')
     tweeter_name = status.user.name.encode('UTF-8', 'replace')
     tweetText = status.text.encode('UTF-8', 'replace')
+    tweetText = tweetText.replace('\n',' ')
     stringout = "tweet by %s (%s): %s" %(tweeter_screen,tweeter_name,tweetText)
   except twitter.TwitterError:
     terror = sys.exc_info()