function BlockXssTest::testNoUnexpectedEscaping
Tests that nothing is escaped other than the blocks explicitly tested.
File
- 
              core/modules/ block/ tests/ src/ Functional/ BlockXssTest.php, line 34 
Class
- BlockXssTest
- Tests that the block module properly escapes block descriptions.
Namespace
Drupal\Tests\block\FunctionalCode
public function testNoUnexpectedEscaping() {
  $this->drupalLogin($this->drupalCreateUser([
    'administer blocks',
    'access administration pages',
  ]));
  $this->drupalGet(Url::fromRoute('block.admin_display'));
  $this->clickLink('Place block');
  $this->assertSession()
    ->assertNoEscaped('<');
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
