From e22e28ca7de2f97fd1b7bfeeed4065be5f750cc6 Mon Sep 17 00:00:00 2001 From: sokai Date: Tue, 30 May 2023 18:59:41 +0200 Subject: [PATCH] Update MetadataRetriever.php Added `mb_convert_encoding()` on `$description` + `$tags`, like `$title` --- application/http/MetadataRetriever.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/http/MetadataRetriever.php b/application/http/MetadataRetriever.php index cfc72583e..86441660e 100644 --- a/application/http/MetadataRetriever.php +++ b/application/http/MetadataRetriever.php @@ -59,6 +59,12 @@ public function retrieve(string $url): array if (!empty($title) && strtolower($charset) !== 'utf-8') { $title = mb_convert_encoding($title, 'utf-8', $charset); } + if (!empty($description) && strtolower($charset) !== 'utf-8') { + $description = mb_convert_encoding($description, 'utf-8', $charset); + } + if (!empty($tags) && strtolower($charset) !== 'utf-8') { + $tags = mb_convert_encoding($tags, 'utf-8', $charset); + } return array_map([$this, 'cleanMetadata'], [ 'title' => $title,