You are here

protected function XssTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::setUp()

File

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

Class

XssTest
XSS Filtering tests.

Namespace

Drupal\Tests\Component\Utility

Code

protected function setUp() {
  parent::setUp();
  $allowed_protocols = [
    'http',
    'https',
    'ftp',
    'news',
    'nntp',
    'telnet',
    'mailto',
    'irc',
    'ssh',
    'sftp',
    'webcal',
    'rtsp',
  ];
  UrlHelper::setAllowedProtocols($allowed_protocols);
}