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 c1c23089ba01450ef5f2cd686f000580e44398cb..d6feb9377b4e36a1c5af96adb078f480c1c6f5fa 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: