From 12884b7556abfd848e42dfb40f6df55fb87c1ef9 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 15 Mar 2018 12:27:34 +1300 Subject: Coerce title into UTF8 representation --- plugin/url_title.pm | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.1