function XssTest::testNoDoubleEscaping

Same name in other branches
  1. 9 core/modules/views_ui/tests/src/Functional/XssTest.php \Drupal\Tests\views_ui\Functional\XssTest::testNoDoubleEscaping()
  2. 8.9.x core/modules/views_ui/tests/src/Functional/XssTest.php \Drupal\Tests\views_ui\Functional\XssTest::testNoDoubleEscaping()
  3. 11.x core/modules/views_ui/tests/src/Functional/XssTest.php \Drupal\Tests\views_ui\Functional\XssTest::testNoDoubleEscaping()

Checks the admin UI for double escaping.

File

core/modules/views_ui/tests/src/Functional/XssTest.php, line 38

Class

XssTest
Tests the Xss vulnerability.

Namespace

Drupal\Tests\views_ui\Functional

Code

public function testNoDoubleEscaping() : void {
    $this->drupalGet('admin/structure/views');
    $this->assertSession()
        ->pageTextContains('sa_contrib_2013_035');
    $this->assertSession()
        ->pageTextContains('Page (/foobar )');
    $this->assertSession()
        ->assertNoEscaped('<');
    $this->drupalGet('admin/structure/views/view/sa_contrib_2013_035');
    $this->assertSession()
        ->assertNoEscaped('<');
    $this->drupalGet('admin/structure/views/nojs/handler/sa_contrib_2013_035/page_1/header/area');
    $this->assertSession()
        ->assertNoEscaped('<');
}

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