public function XssTest::providerTestInvalidMultiByte in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::providerTestInvalidMultiByte()
Data provider for testInvalidMultiByte().
Return value
array An array of arrays containing strings:
- The value to filter.
- The value to expect after filtering.
- The assertion message.
See also
testInvalidMultiByte()
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ XssTest.php, line 474
Class
- XssTest
- XSS Filtering tests.
Namespace
Drupal\Tests\Component\UtilityCode
public function providerTestInvalidMultiByte() {
return [
[
"",
'',
'Xss::filter() accepted invalid sequence "Foo\\xC0barbaz"',
],
[
"Fooÿñ",
"Fooÿñ",
'Xss::filter() rejects valid sequence Fooÿñ"',
],
[
"",
'',
'HTML filter -- overlong UTF-8 sequences.',
],
];
}