From c04858116ef69bbe80d0578cb150d6fb9a4a9ac3 Mon Sep 17 00:00:00 2001
From: David Phillips <david@sighup.nz>
Date: Sat, 22 Jun 2019 14:13:55 +1200
Subject: URL_Title: Workaround for UTF-8 decoder crash

---
 Plugin/URL_Title.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'Plugin')

diff --git a/Plugin/URL_Title.pm b/Plugin/URL_Title.pm
index 5299e1f..85dc1eb 100644
--- a/Plugin/URL_Title.pm
+++ b/Plugin/URL_Title.pm
@@ -86,7 +86,7 @@ sub get_title
 	$p->parse($html);
 	return (undef, undef, "Error parsing HTML: $!") if $!;
 
-	if ($charset) {
+	if ($charset and $charset ne "utf-8") {
 		my $dc = Encode::find_encoding($charset);
 		return (undef, undef, "Error: Unknown encoding $charset") unless $dc;
 		$title = $dc->decode($title);
-- 
cgit v1.1