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 8e3bfe6f336272374a82b0f67df0b81924dfebf2..538de0960741ff2dd5f3c503055820cf7a5365f4 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("&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()
     stringout = "tweet by %s (%s): %s" %(tweeter_screen,tweeter_name,tweetText)
   except twitter.TwitterError:
     terror = sys.exc_info()