From 817ebdeb8eeaa344fd77a2c84d4e90d4cdf5f66a Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 7 May 2018 20:57:27 +1200 Subject: Fold URL title whitespace into same line --- Plugin/URL_Title.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Plugin') 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; -- cgit v1.1