aboutsummaryrefslogtreecommitdiffstats
path: root/tinyurl-tabcomplete
diff options
context:
space:
mode:
authorArtem Savkov <artem.savkov@gmail.com>2011-07-14 07:48:39 +0000
committerArtem Savkov <artem.savkov@gmail.com>2011-07-14 07:48:39 +0000
commit1b722bb1eac9c3a568de6f203ecd2277d1c1fd6b (patch)
tree94987ccdc7b315527df0e0c13a6b90a08a1dfb53 /tinyurl-tabcomplete
parentfix https urls shortening (diff)
downloadirssi-scripts-1b722bb1eac9c3a568de6f203ecd2277d1c1fd6b.tar.gz
irssi-scripts-1b722bb1eac9c3a568de6f203ecd2277d1c1fd6b.zip
shortening support for protocols other than http(s)
Diffstat (limited to '')
-rw-r--r--tinyurl-tabcomplete/complete-tiny-url.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/tinyurl-tabcomplete/complete-tiny-url.pl b/tinyurl-tabcomplete/complete-tiny-url.pl
index 45a00c0..ad43c5e 100644
--- a/tinyurl-tabcomplete/complete-tiny-url.pl
+++ b/tinyurl-tabcomplete/complete-tiny-url.pl
@@ -123,7 +123,7 @@ sub match_uri {
if ($text =~ $regex) {
my $uri = $1;
# shorten needs the http prefix or it'll treat it as a relative link.
- $uri = 'http://' . $uri if $uri !~ m(https?://);
+ $uri = 'http://' . $uri if $uri !~ m([a-z][\w-]+:(?:/{1,3}|[a-z0-9%]));
return $uri;
} else {
# no match