From f378b109fde4c11acd80576333a41249d50604c6 Mon Sep 17 00:00:00 2001 From: Malgorzata Antoniak Date: Tue, 7 Jun 2022 12:25:01 +0200 Subject: [PATCH] invalid characters in translations fix (" -> ') --- .../coi/pomocua/ads/translatorservice/TranslatorService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/pl/gov/coi/pomocua/ads/translatorservice/TranslatorService.java b/src/main/java/pl/gov/coi/pomocua/ads/translatorservice/TranslatorService.java index 6352f36..2802b16 100644 --- a/src/main/java/pl/gov/coi/pomocua/ads/translatorservice/TranslatorService.java +++ b/src/main/java/pl/gov/coi/pomocua/ads/translatorservice/TranslatorService.java @@ -85,7 +85,7 @@ private EnumMap mapTranslationsFromJsonArray(JsonArray jsonArr for (JsonElement t : jsonArray) { String translationLanguageString = t.getAsJsonObject().get("to").getAsString().toLowerCase(); if (isLanguageSupported(translationLanguageString) && !translationLanguageString.equals(detectedLanguage)) { - String translation = t.getAsJsonObject().get("text").getAsString(); + String translation = t.getAsJsonObject().get("text").getAsString().replace('"', '\''); translationMap.put(Language.fromIsoCode(translationLanguageString), translation); } }