From 7fbd9d47ee9219ac4f87cb8494e9d8b2b1948881 Mon Sep 17 00:00:00 2001 From: Uwe Michelfelder Date: Fri, 24 Mar 2023 17:56:27 +0100 Subject: [PATCH] [FIX] Trim source and target strings Prevent an error during sync by sending non-trimmed strings --- Classes/Service/DeeplGlossaryService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Service/DeeplGlossaryService.php b/Classes/Service/DeeplGlossaryService.php index 8a8131b8..bc5cdb56 100644 --- a/Classes/Service/DeeplGlossaryService.php +++ b/Classes/Service/DeeplGlossaryService.php @@ -126,7 +126,7 @@ public function createGlossary( $formattedEntries = []; foreach ($entries as $entry) { - $formattedEntries[] = sprintf("%s\t%s", $entry['source'], $entry['target']); + $formattedEntries[] = sprintf("%s\t%s", trim($entry['source']), trim($entry['target'])); } $paramsArray = [