# HG changeset patch # User Matti Hamalainen # Date 1412077793 -10800 # Node ID b8bf9d7666b6dfcd74fe62cf6c3529edf02bf1ce # Parent 03579553233bda2f0b959cb64c948b651e31631f urllog: Improve URL / link matching. diff -r 03579553233b -r b8bf9d7666b6 urllog.tcl --- 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 } }