diff options
author | David Phillips <david@sighup.nz> | 2018-05-07 20:57:27 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2018-05-07 20:57:27 +1200 |
commit | 817ebdeb8eeaa344fd77a2c84d4e90d4cdf5f66a (patch) | |
tree | 03213faf857b821cc45b3215d53f2ca0f2cc3858 /Plugin | |
parent | 00f7c03c9ad2e9dddf92f679b0f59c8d6b47a37a (diff) | |
download | idalius-817ebdeb8eeaa344fd77a2c84d4e90d4cdf5f66a.tar.xz |
Fold URL title whitespace into same line
Diffstat (limited to 'Plugin')
-rw-r--r-- | Plugin/URL_Title.pm | 3 |
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; |