isSanitized example


        if ($data->getValue() === null) {
            return null;
        }

        if (!$field->is(AllowHtml::class)) {
            return strip_tags((string) $data->getValue());
        }

        $flag = $field->getFlag(AllowHtml::class);

        if ($flag instanceof AllowHtml && $flag->isSanitized()) {
            $fieldKey = sprintf('%s.%s', (string) $existence->getEntityName()$field->getPropertyName());

            return $sanitizer->sanitize((string) $data->getValue()[], false, $fieldKey);
        }

        return (string) $data->getValue();
    }
}
throw RoutingException::invalidRequestParameter($field);
        }

        $flag = $property->getFlag(AllowHtml::class);

        if ($flag === null) {
            return new JsonResponse(
                ['preview' => strip_tags($html)]
            );
        }

        if ($flag instanceof AllowHtml && !$flag->isSanitized()) {
            return new JsonResponse(
                ['preview' => $html]
            );
        }

        return new JsonResponse(
            ['preview' => $this->htmlSanitizer->sanitize($html[], false, $field)]
        );
    }

    private function fetchLanguageIdByName(string $isoCode, Connection $connection): ?string
    {
Home | Imprint | This part of the site doesn't use cookies.