From cc2cafca3bc661ed242310d881e1c30853f39af6 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Fri, 19 Aug 2022 23:48:31 +0900 Subject: [PATCH] Issue #3268306 by lauriii, Wim Leers, catch, Dom.: [GHS] Custom/unofficial HTML tags not retained: <drupal-media>, <drupal-entity>, <foobar> --- .../src/FunctionalJavascript/CKEditor5AllowedTagsTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php index 07a26cc22112..540f54ada515 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php @@ -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>'); } } -- GitLab