function ActiveLinkTest::testQueryStringQuotes

Ensures no JS error is thrown with query strings containing special chars.

File

core/modules/system/tests/src/FunctionalJavascript/ActiveLinkTest.php, line 26

Class

ActiveLinkTest
Tests active link JS behavior.

Namespace

Drupal\Tests\system\FunctionalJavascript

Code

public function testQueryStringQuotes() : void {
    $user = $this->createUser();
    $this->drupalLogin($user);
    $this->drupalGet($this->getSession()
        ->getCurrentUrl(), [
        'query' => [
            'foo' => "\"'[](){}*+~>|\\/:;,.!@#\$%^&-_=?<>",
        ],
    ]);
    $this->failOnJavaScriptErrors();
}

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