From b6217bd4a940039834a21120e6adcad1b99b0010 Mon Sep 17 00:00:00 2001 From: Lauri Eskola Date: Tue, 12 Jul 2022 16:16:42 +0300 Subject: [PATCH] Issue #3252587 by longwave, smustgrave, Chalk, borisson_, alexpott: Extend the $skip_protocol_filtering list of attributes to use Tailwind CSS classes with prefix ":" --- core/lib/Drupal/Component/Utility/Xss.php | 1 + core/tests/Drupal/Tests/Component/Utility/XssTest.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/lib/Drupal/Component/Utility/Xss.php b/core/lib/Drupal/Component/Utility/Xss.php index 1f1690d11c7..6d461d3f020 100644 --- a/core/lib/Drupal/Component/Utility/Xss.php +++ b/core/lib/Drupal/Component/Utility/Xss.php @@ -237,6 +237,7 @@ class Xss { 'alt', 'rel', 'property', + 'class', ]); $working = $mode = 1; diff --git a/core/tests/Drupal/Tests/Component/Utility/XssTest.php b/core/tests/Drupal/Tests/Component/Utility/XssTest.php index d8ddc227cae..db5ee1d7b91 100644 --- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php @@ -504,8 +504,8 @@ class XssTest extends TestCase { public function providerTestAttributes() { return [ [ - 'Example: alt', - 'Example: alt', + 'Example: alt', + 'Example: alt', 'Image tag with alt and title attribute', ['img'], ],