Skip to content

Commit d621051

Browse files
committed
[BUGFIX] decode html special characters
The jSON response comes with encoded HTML characters. Redecode the chars
1 parent f39ea33 commit d621051

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/Hooks/TranslateHook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function translateContent(
144144
if (!empty($response) && isset($response['translations'])) {
145145
foreach ($response['translations'] as $translation) {
146146
if ($translation['text'] != '') {
147-
$content = $translation['text'];
147+
$content = htmlspecialchars_decode($translation['text'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5);
148148
break;
149149
}
150150
}

0 commit comments

Comments
 (0)