aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-07-18 03:00:07 +0000
committerTom Feist <shabble@metavore.org>2011-07-18 03:00:07 +0000
commit4cfb69501bf5853b9a9ff6d7c0b3427fb7bbbcb7 (patch)
treef1c03ccf4fcb224dcdba01370b89d65eaa0bf6af
parentOnly attempt join if channel exists (diff)
parentshortening support for protocols other than http(s) (diff)
downloadirssi-scripts-4cfb69501bf5853b9a9ff6d7c0b3427fb7bbbcb7.tar.gz
irssi-scripts-4cfb69501bf5853b9a9ff6d7c0b3427fb7bbbcb7.zip
Merge pull request #9 from sm00th/tinyurl-tabcomplete
shortening for protocols other than http. defaults to http:// unless specified.
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 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