diff options
author | David Phillips <david@sighup.nz> | 2017-04-18 21:34:26 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-04-18 21:36:34 +1200 |
commit | e8247d272afbc57601dfa542caa2d7fcd60173ff (patch) | |
tree | 19a3878f0a6991e9fd9ba736086a8d84d4c9acfb /idalius.pl | |
parent | d95fa59541aaa4ea34f3188ef895e5fc5ed1f08a (diff) | |
download | idalius-e8247d272afbc57601dfa542caa2d7fcd60173ff.tar.xz |
Strip protocol from title's source URL
Helps avoid other poorly configured bots
Diffstat (limited to 'idalius.pl')
-rwxr-xr-x | idalius.pl | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -96,6 +96,9 @@ sub url_get_title my $shorturl = $url; $shorturl = (substr $url, 0, $config{url_len}) . "β¦" if length ($url) > $config{url_len}; + # remove http(s):// to avoid triggering other poorly configured bots + $shorturl =~ s,^https?://,,g; + my $composed_title = "$title ($shorturl)"; return $composed_title; } |