You are here

public function BlockXssTest::testNoUnexpectedEscaping in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/block/src/Tests/BlockXssTest.php \Drupal\block\Tests\BlockXssTest::testNoUnexpectedEscaping()

Tests that nothing is escaped other than the blocks explicitly tested.

File

core/modules/block/src/Tests/BlockXssTest.php, line 34
Contains \Drupal\block\Tests\BlockXssTest.

Class

BlockXssTest
Tests that the block module properly escapes block descriptions.

Namespace

Drupal\block\Tests

Code

public function testNoUnexpectedEscaping() {
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'administer blocks',
    'access administration pages',
  ]));
  $this
    ->drupalGet(Url::fromRoute('block.admin_display'));
  $this
    ->clickLinkPartialName('Place block');
  $this
    ->assertNoEscaped('<');
}