diff options
author | David Phillips <david@sighup.nz> | 2018-04-10 23:53:18 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2018-04-10 23:53:18 +1200 |
commit | f53e5933315a316bb94d8d27cebbb95554aca6ba (patch) | |
tree | 8fb3529043887a338eca649a746b7466cb504ca7 /Plugin | |
parent | a5316e514b05f8f0bb9dc745ede654a968e41cc1 (diff) | |
download | idalius-f53e5933315a316bb94d8d27cebbb95554aca6ba.tar.xz |
Decode HTML body before passing to to head parser
From the HTML::HeadParser docs:
> Note that the HTML::HeadParser might get confused if raw undecoded UTF-8 is
> passed to the parse() method. Make sure the strings are properly decoded
> before passing them on.
This explains some hard-to-trace bugs with character mangling
Diffstat (limited to 'Plugin')
-rw-r--r-- | Plugin/URL_Title.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Plugin/URL_Title.pm b/Plugin/URL_Title.pm index 495df8e..8248560 100644 --- a/Plugin/URL_Title.pm +++ b/Plugin/URL_Title.pm @@ -45,6 +45,7 @@ sub message } my $html = $response->{content}; + utf8::decode($html); my $parser = HTML::HeadParser->new; $parser->parse($html); |