aboutsummaryrefslogtreecommitdiff
path: root/Plugin
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-05-07 20:57:27 +1200
committerDavid Phillips <david@sighup.nz>2018-05-07 20:57:27 +1200
commit817ebdeb8eeaa344fd77a2c84d4e90d4cdf5f66a (patch)
tree03213faf857b821cc45b3215d53f2ca0f2cc3858 /Plugin
parent00f7c03c9ad2e9dddf92f679b0f59c8d6b47a37a (diff)
downloadidalius-817ebdeb8eeaa344fd77a2c84d4e90d4cdf5f66a.tar.xz
Fold URL title whitespace into same line
Diffstat (limited to 'Plugin')
-rw-r--r--Plugin/URL_Title.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/Plugin/URL_Title.pm b/Plugin/URL_Title.pm
index 5774528..1d0056e 100644
--- a/Plugin/URL_Title.pm
+++ b/Plugin/URL_Title.pm
@@ -64,6 +64,9 @@ sub message
$p->parse($html);
die "Error: $!\n" if $!;
+ $title =~ s/\s+/ /g;
+ $title =~ s/(^\s+|\s+$)//g;
+
utf8::upgrade($title);
return unless $title;