home · contact · privacy
Improve URL parser regex.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 18 Jan 2016 01:13:54 +0000 (02:13 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 18 Jan 2016 01:13:54 +0000 (02:13 +0100)
plomlombot.py

index c1c2308..d6feb93 100755 (executable)
@@ -100,7 +100,7 @@ def lineparser_loop(io, nickname):
     def act_on_privmsg(tokens):
 
         def url_check(msg):
-            matches = re.findall("(https?://[^\s]+)", msg)
+            matches = re.findall("(https?://[^\s>]+)", msg)
             for i in range(len(matches)):
                 url = matches[i]
                 try: