// Assume $input is a user-provided string $safeInput = \TYPO3\CMS\Core\Utility\GeneralUtility::removeXSS($input);
// Assume $input and $configuration are user-provided $customConfig = new \TYPO3\CMS\Core\Crypto\PasswordHashing\Argon2iConfiguration($configuration); $safeInput = \TYPO3\CMS\Core\Utility\GeneralUtility::removeXSS($input, $customConfig);
// Assume $input is a user-provided string within a TYPO3 Extbase controller $propertyMappingConfiguration = $this->arguments->getArgument('myArgument')->getPropertyMappingConfiguration(); $propertyMappingConfiguration->setTypeConverterOption( \TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, \TYPO3\CMS\Extbase\Mvc\Controller\Argument::ARGUMENT_ARRAY_TYPE_CONVERTER, \TYPO3\CMS\Core\Error\Error::class, \TYPO3\CMS\Core\Utility\GeneralUtility::removeXSS($input) );The GeneralUtility class and its methods are part of the TYPO3 core utility package, located in the `typo3/cms-core` Composer package library.