diff options
author | lookshe <lookshe@fumuga.com> | 2014-05-27 19:48:57 +0200 |
---|---|---|
committer | lookshe <lookshe@fumuga.com> | 2014-05-27 19:48:57 +0200 |
commit | c5e05d88d4c175ef318d538473a7e0f438ef76c3 (patch) | |
tree | 6539fc83d77e9c89b269edff81d2d4204fa90a34 | |
parent | decb6e9f94257391a37bef67694266cfd75e3424 (diff) |
append http:// if missing before links (getting title didn't work well without
-rw-r--r-- | tinyurl.tcl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tinyurl.tcl b/tinyurl.tcl index 7c6a411..b3ebd52 100644 --- a/tinyurl.tcl +++ b/tinyurl.tcl @@ -56,6 +56,10 @@ foreach act_arg $arg { # Check length of URL set length [string length $url] + if {[string match "www.*" $url] == 1} { + set url "http://$url" + } + if {$length >= $url_length} { #set tinyurl [make_tinyurl $url] |