From d621051f2b2a5439e56a8cbf6c5ebc5ddacce8dc Mon Sep 17 00:00:00 2001 From: Markus Hofmann Date: Fri, 5 May 2023 13:02:25 +0200 Subject: [PATCH] [BUGFIX] decode html special characters The jSON response comes with encoded HTML characters. Redecode the chars --- Classes/Hooks/TranslateHook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Hooks/TranslateHook.php b/Classes/Hooks/TranslateHook.php index 10d80530..cf2c4dfa 100644 --- a/Classes/Hooks/TranslateHook.php +++ b/Classes/Hooks/TranslateHook.php @@ -144,7 +144,7 @@ public function translateContent( if (!empty($response) && isset($response['translations'])) { foreach ($response['translations'] as $translation) { if ($translation['text'] != '') { - $content = $translation['text']; + $content = htmlspecialchars_decode($translation['text'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5); break; } }