From e8247d272afbc57601dfa542caa2d7fcd60173ff Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 18 Apr 2017 21:34:26 +1200 Subject: Strip protocol from title's source URL Helps avoid other poorly configured bots --- idalius.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/idalius.pl b/idalius.pl index 1a81917..c0782ff 100755 --- a/idalius.pl +++ b/idalius.pl @@ -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; } -- cgit v1.1