chiark / gitweb /
Restore correct handling of multi-line tweets
authorMatthew Vernon <matthewv@chiark.greenend.org.uk>
Thu, 16 Jun 2016 14:49:11 +0000 (15:49 +0100)
committerMatthew Vernon <matthewv@chiark.greenend.org.uk>
Thu, 16 Jun 2016 14:49:11 +0000 (15:49 +0100)
commands.py

index 8e3bfe6..538de09 100755 (executable)
@@ -577,6 +577,7 @@ def getTweet(urlstring,twitapi):
     tweetText = tweetText.replace("&gt;",">")
     tweetText = tweetText.replace("&lt;","<")
     tweetText = tweetText.replace("&amp;","&")
+    tweetText = tweetText.replace("\n"," ")
     stringout = "tweet by %s (%s): %s" %(tweeter_screen,tweeter_name,tweetText)
   except twitter.TwitterError:
     terror = sys.exc_info()