summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlookshe <lookshe@fumuga.com>2014-05-27 19:48:57 +0200
committerlookshe <lookshe@fumuga.com>2014-05-27 19:48:57 +0200
commitc5e05d88d4c175ef318d538473a7e0f438ef76c3 (patch)
tree6539fc83d77e9c89b269edff81d2d4204fa90a34
parentdecb6e9f94257391a37bef67694266cfd75e3424 (diff)
append http:// if missing before links (getting title didn't work well without
-rw-r--r--tinyurl.tcl4
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]