Skip to content
Snippets Groups Projects
Verified Commit 6f437449 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3464340 by herved, ahsannazir, smustgrave, longwave, nod_: JS errors...

Issue #3464340 by herved, ahsannazir, smustgrave, longwave, nod_: JS errors from Drupal.behaviors.activeLinks (... is not a valid selector)

(cherry picked from commit 91cd1ab5)
parent fece4f7a
No related branches found
No related tags found
10 merge requests!12802Issue #3537193 by opauwlo: Add enable absolute path option for CKEditor5 image uploads,!12745Fixed: Path alias language doesn't changes on changing of node language,!12684Issue #3220784,!12537Add ViewsConfigUpdater deprecation support for default_argument_skip_url,!12523Issue #3493858 by vidorado, xavier.masson, smustgrave: Extend ViewsBlockBase...,!122353526426-warning-for-missing,!11958Issue #3490507 by alexpott, smustgrave: Fix bogus mocking in...,!11769Issue #3517987: Add option to contextual filters to encode slashes in query parameter.,!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #280876 passed with warnings
Pipeline: drupal

#280880

    ......@@ -23,11 +23,11 @@
    // Start by finding all potentially active links.
    const path = drupalSettings.path;
    const queryString = JSON.stringify(path.currentQuery);
    const querySelector = path.currentQuery
    ? `[data-drupal-link-query='${queryString}']`
    const querySelector = queryString
    ? `[data-drupal-link-query="${CSS.escape(queryString)}"]`
    : ':not([data-drupal-link-query])';
    const originalSelectors = [
    `[data-drupal-link-system-path="${path.currentPath}"]`,
    `[data-drupal-link-system-path="${CSS.escape(path.currentPath)}"]`,
    ];
    let selectors;
    ......
    <?php
    declare(strict_types=1);
    namespace Drupal\Tests\system\FunctionalJavascript;
    use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
    /**
    * Tests active link JS behavior.
    *
    * @see Drupal.behaviors.activeLinks
    *
    * @group system
    */
    class ActiveLinkTest extends WebDriverTestBase {
    /**
    * {@inheritdoc}
    */
    protected $defaultTheme = 'stark';
    /**
    * Ensures no JS error is thrown with query strings containing special chars.
    */
    public function testQueryStringQuotes(): void {
    $user = $this->createUser();
    $this->drupalLogin($user);
    $this->drupalGet($this->getSession()->getCurrentUrl(), ['query' => ['foo' => "\"'[](){}*+~>|\\/:;,.!@#$%^&-_=?<>"]]);
    $this->failOnJavaScriptErrors();
    }
    }
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment