Skip to content
Snippets Groups Projects

Issue #3238915: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS

Closed Issue #3238915: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS
Closed Harumi Jang requested to merge issue/drupal-3238915:3238915-refactor-if-feasible into 9.3.x
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
  • cc2cafca
    Issue #3268306 by lauriii, Wim Leers, catch, Dom.: [GHS] Custom/unofficial... · cc2cafca
    catch authored
    Issue #3268306 by lauriii, Wim Leers, catch, Dom.: [GHS] Custom/unofficial HTML tags not retained: <drupal-media>, <drupal-entity>, <foobar>
@@ -457,7 +457,7 @@ public function testFullHtml() {
// Add a node with text rendered via the Plain Text format.
$this->drupalGet('node/add');
$page->fillField('title[0][value]', 'My test content');
$page->fillField('body[0][value]', '<p><a style="color:#ff0000;" foo="bar" hreflang="en" href="https://example.com"><abbr title="National Aeronautics and Space Administration">NASA</abbr> is an acronym.</a></p>');
$page->fillField('body[0][value]', '<foo bar="baz">⬅️✌️➡️</foo><p><a style="color:#ff0000;" foo="bar" hreflang="en" href="https://example.com"><abbr title="National Aeronautics and Space Administration">NASA</abbr> is an acronym.</a></p>');
$page->pressButton('Save');
// Configure Full HTML text format to use CKEditor 5.
@@ -480,7 +480,7 @@ public function testFullHtml() {
// But note that the `style` attribute was stripped by
// \Drupal\editor\EditorXssFilter\Standard.
$assert_session->responseContains('<p><a foo="bar" hreflang="en" href="https://example.com"><abbr title="National Aeronautics and Space Administration">NASA</abbr> is an acronym.</a></p>');
$assert_session->responseContains('<foo bar="baz">⬅️✌️➡️</foo><p><a foo="bar" hreflang="en" href="https://example.com"><abbr title="National Aeronautics and Space Administration">NASA</abbr> is an acronym.</a></p>');
// Ensure attributes are retained after enabling link plugin.
$this->drupalGet('admin/config/content/formats/manage/full_html');
@@ -514,8 +514,8 @@ public function testFullHtml() {
$page->pressButton('Save');
// The `style` and foo` attributes should have been removed, as should the
// `<abbr>` tag.
$assert_session->responseContains('<p><a href="https://example.com" hreflang="en">NASA is an acronym.</a></p>');
// `<abbr>` and `<foo>` tags.
$assert_session->responseContains('<p>⬅️✌️➡️</p><p><a href="https://example.com" hreflang="en">NASA is an acronym.</a></p>');
}
}
Loading