[BUGFIX] Avoid deprecated FILTER_SANITIZE_STRING in TextValidator
The filter_var() filter FILTER_SANITIZE_STRING is deprecated as of PHP 8.1. Extbase TextValidator uses it. Goal of the text validator is to allow most 'casual' characters and strings as long as they don't contain HTML. The path switches to strip_tags() to validate. Tests are refactored and extended to show more cases. https://wiki.php.net/rfc/deprecations_php_8_1 Change-Id: Ifbf3de7a7200512d1281b694a7a6c2f8fb3ac781 Resolves: #95768 Releases: master Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71968 Tested-by:Jochen <rothjochen@gmail.com> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Jochen <rothjochen@gmail.com> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de>
Showing
- typo3/sysext/extbase/Classes/Validation/Validator/TextValidator.php 3 additions, 3 deletions...xt/extbase/Classes/Validation/Validator/TextValidator.php
- typo3/sysext/extbase/Tests/Unit/Validation/Validator/TextValidatorTest.php 54 additions, 25 deletions...ase/Tests/Unit/Validation/Validator/TextValidatorTest.php
Please register or sign in to comment