aboutsummaryrefslogtreecommitdiffstats
path: root/tinyurl-tabcomplete/complete-tiny-url.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-07-20 08:39:43 +0000
committerTom Feist <shabble@metavore.org>2011-07-20 08:39:43 +0000
commit06128dbb06ff2b57dd53b6c5ab0bbacd579f1326 (patch)
treeaf5c046afacfebe8ce5fd72b33ea74ab950e47a2 /tinyurl-tabcomplete/complete-tiny-url.pl
parentadd additional check to avoid crash if URI doesn't have a 'host' method. (diff)
parentat least on some networks, just a prefix is valid (diff)
downloadirssi-scripts-06128dbb06ff2b57dd53b6c5ab0bbacd579f1326.tar.gz
irssi-scripts-06128dbb06ff2b57dd53b6c5ab0bbacd579f1326.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'tinyurl-tabcomplete/complete-tiny-url.pl')
-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 b2d448f..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(http://);
+ $uri = 'http://' . $uri if $uri !~ m([a-z][\w-]+:(?:/{1,3}|[a-z0-9%]));
return $uri;
} else {
# no match