diff options
author | richo <richo@psych0tik.net> | 2011-09-21 11:33:31 +0000 |
---|---|---|
committer | richo <richo@psych0tik.net> | 2011-09-21 11:33:31 +0000 |
commit | c705a09d0fe81ac20497d17640792cdcaf5ec0d0 (patch) | |
tree | aaa382f548260902c96274e75c7a184db0e7cf8d /longify | |
parent | Merge branch 'master' into richoH-dev (diff) | |
parent | Remove deprecated docs (diff) | |
download | irssi-scripts-c705a09d0fe81ac20497d17640792cdcaf5ec0d0.tar.gz irssi-scripts-c705a09d0fe81ac20497d17640792cdcaf5ec0d0.zip |
Merge branch 'master' into richoH-dev
Diffstat (limited to 'longify')
-rw-r--r-- | longify/longify-urls.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/longify/longify-urls.pl b/longify/longify-urls.pl index 38e8ba8..cd36503 100644 --- a/longify/longify-urls.pl +++ b/longify/longify-urls.pl @@ -130,7 +130,12 @@ sub _handle_messages { my $uri_obj = URI->new($url); - return unless ref($uri_obj) && exists $domains->{$uri_obj->host}; + # check we've got a valid url + return unless ref($uri_obj); + return unless $uri_obj->can('host'); + + # match against the whitelist. + return unless exists $domains->{$uri_obj->host}; $pending_msg_params->{$url} = [@_]; $lookup_in_progress = 1; |