From c5e05d88d4c175ef318d538473a7e0f438ef76c3 Mon Sep 17 00:00:00 2001 From: lookshe Date: Tue, 27 May 2014 19:48:57 +0200 Subject: append http:// if missing before links (getting title didn't work well without --- tinyurl.tcl | 4 ++++ 1 file changed, 4 insertions(+) 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] -- cgit v1.2.3