diff urllog.tcl @ 221:b8bf9d7666b6

urllog: Improve URL / link matching.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 30 Sep 2014 14:49:53 +0300
parents 4e09bcc48851
children f4b7b6e8fb37
line wrap: on
line diff
--- a/urllog.tcl	Tue Sep 30 14:48:51 2014 +0300
+++ b/urllog.tcl	Tue Sep 30 14:49:53 2014 +0300
@@ -618,7 +618,7 @@
     if {[string match $akey $uchan]} {
       ### Do the URL checking
       foreach str [split $utext " "] {
-        if {[regexp "(ftp|http|https)://|www\..+|ftp\..*" $str]} {
+        if {[regexp "((ftp|http|https)://\[^\[:space:\]\]+|^(www|ftp)\.\[^\[:space:\]\]+)" $str ulink]} {
           urllog_checkurl $str $unick $uhost $uchan
         }
       }