function XssTest::providerTestFilterXssAdminNotNormalized

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::providerTestFilterXssAdminNotNormalized()
  2. 8.9.x core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::providerTestFilterXssAdminNotNormalized()
  3. 10 core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::providerTestFilterXssAdminNotNormalized()

Data provider for testFilterXssAdminNotNormalized().

Return value

array An array of arrays containing strings:

  • The value to filter.
  • The value to expect after filtering.
  • The assertion message.

See also

testFilterXssAdminNotNormalized()

File

core/tests/Drupal/Tests/Component/Utility/XssTest.php, line 602

Class

XssTest
XSS Filtering tests.

Namespace

Drupal\Tests\Component\Utility

Code

public static function providerTestFilterXssAdminNotNormalized() {
    return [
        // DRUPAL-SA-2008-044
[
            '<object />',
            'object',
            'Admin HTML filter -- should not allow object tag.',
        ],
        [
            '<script />',
            'script',
            'Admin HTML filter -- should not allow script tag.',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.