public function XssTest::testFilterXSSAdmin

Checks that Xss::filterAdmin() correctly strips unallowed tags.

File

drupal/core/tests/Drupal/Tests/Component/Utility/XssTest.php, line 483
Contains \Drupal\Tests\Component\Utility\XssTest.

Class

XssTest
Tests the Xss utility.

Namespace

Drupal\Tests\Component\Utility

Code

public function testFilterXSSAdmin() {
  $value = Xss::filterAdmin('<style /><iframe /><frame /><frameset /><meta /><link /><embed /><applet /><param /><layer />');
  $this
    ->assertEquals($value, '', 'Admin HTML filter -- should never allow some tags.');
}