diff --git a/inc/translation.class.php b/inc/translation.class.php index f0f385a90..6846f64c2 100644 --- a/inc/translation.class.php +++ b/inc/translation.class.php @@ -228,7 +228,9 @@ public function add(array $input) : bool { $type = $translatableStrings['id'][$input['id']]; $original = $translatableStrings[$type][$input['id']]; - $translations[$original] = Toolbox::stripslashes_deep($input['value']); + $input['value'] = Sanitizer::unsanitize($input['value']); + $input['value'] = str_replace('\r\n', '', $input['value']); + $translations[$original] = Sanitizer::sanitize($input['value'], false); if (!$form->setTranslations($formLanguage->fields['name'], $translations)) { Session::addMessageAfterRedirect(__('Failed to add the translation.', 'formcreator'), false, ERROR);