Skip to content

Commit 0b2d7ac

Browse files
committed
unscape html tags
1 parent 6a86799 commit 0b2d7ac

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Services/Proofread/OpenAiService.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public function proofreadAll(array $texts): array
7272
]);
7373

7474
$content = $response->choices[0]->message->content;
75+
$content = str_replace('\\\/', "\/", $content);
7576
$translations = json_decode($content, true);
7677

7778
return $translations;

src/Services/Translate/OpenAiService.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ function () use ($texts, $targetLocale) {
101101
]);
102102

103103
$content = $response->choices[0]->message->content;
104+
$content = str_replace('\\\/', "\/", $content);
104105
$translations = json_decode($content, true);
105106

106107
return $translations;

0 commit comments

Comments
 (0)