From 446d123b9b068d91624b960b1d133fc9a25c146c Mon Sep 17 00:00:00 2001 From: Krzysztof Marczak Date: Thu, 8 Jul 2021 11:42:53 +0200 Subject: [PATCH] bugfix for unescaped html tags in data being sent to translation provider --- src/DivanteTranslationBundle/Controller/ObjectController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DivanteTranslationBundle/Controller/ObjectController.php b/src/DivanteTranslationBundle/Controller/ObjectController.php index 8d618ab..c3c3970 100644 --- a/src/DivanteTranslationBundle/Controller/ObjectController.php +++ b/src/DivanteTranslationBundle/Controller/ObjectController.php @@ -55,6 +55,7 @@ public function translateFieldAction(Request $request, ProviderFactory $provider $provider->setFormality($request->get('formality')); } + $data = strip_tags($data); $data = $provider->translate($data, $lang); } catch (\Throwable $exception) { return $this->adminJson([