diff --git a/sources/Form/Validator/MultipleChoicesValidator.php b/sources/Form/Validator/MultipleChoicesValidator.php index 33113f1f9..1c34eb6cc 100644 --- a/sources/Form/Validator/MultipleChoicesValidator.php +++ b/sources/Form/Validator/MultipleChoicesValidator.php @@ -53,7 +53,8 @@ class MultipleChoicesValidator extends AbstractValidator private function CheckValueAgainstChoices(string $sValue, array &$aErrorMessages): void { if (false === array_key_exists($sValue, $this->aChoices)) { - $aErrorMessages[] = "Value ({$sValue}) is not part of the field possible values list"; + $sValue = utils::HtmlEntities($sValue); + $aErrorMessages[] = "Value ({$sValue}) is not part of the field possible values list"; } } } \ No newline at end of file diff --git a/sources/Form/Validator/SelectObjectValidator.php b/sources/Form/Validator/SelectObjectValidator.php index a4d0c69cd..3794a353e 100644 --- a/sources/Form/Validator/SelectObjectValidator.php +++ b/sources/Form/Validator/SelectObjectValidator.php @@ -37,6 +37,7 @@ class SelectObjectValidator extends AbstractValidator $iObjectsCount = $oSetForExistingCurrentValue->CountWithLimit(1); if ($iObjectsCount === 0) { + $value = utils::HtmlEntities($value); return ["Value $value does not match the corresponding filter set"]; }