aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-03-15 12:27:34 +1300
committerDavid Phillips <david@sighup.nz>2018-03-15 12:27:34 +1300
commit12884b7556abfd848e42dfb40f6df55fb87c1ef9 (patch)
treeb9dc66f9e3a77784f728c841f554ff01abc19069
parent3778d3e19229252a2cb8260028bd737b23e27a13 (diff)
downloadidalius-12884b7556abfd848e42dfb40f6df55fb87c1ef9.tar.xz
Coerce title into UTF8 representation
-rw-r--r--plugin/url_title.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/url_title.pm b/plugin/url_title.pm
index c13104d..9d96410 100644
--- a/plugin/url_title.pm
+++ b/plugin/url_title.pm
@@ -6,6 +6,7 @@ use strict;
use warnings;
use HTTP::Tiny;
use HTML::HeadParser;
+use utf8;
my %config;
@@ -49,6 +50,7 @@ sub message
# get title and unpack from utf8 (assumption)
my $title = $parser->header("title");
+ utf8::upgrade($title);
return unless $title;
my $shorturl = $url;