Unverified Commit c9770654 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3252587 by longwave, smustgrave, Chalk, borisson_, alexpott: Extend the...

Issue #3252587 by longwave, smustgrave, Chalk, borisson_, alexpott: Extend the $skip_protocol_filtering list of attributes to use Tailwind CSS classes with prefix ":"

(cherry picked from commit b6217bd4)
(cherry picked from commit 39faf571)
parent 59047274
Loading
Loading
Loading
Loading
+1 −0
Changes for core/lib/Drupal/Component/Utility/Xss.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -237,6 +237,7 @@ protected static function attributes($attributes) {
              'alt',
              'rel',
              'property',
              'class',
            ]);

            $working = $mode = 1;
+2 −2
Changes for core/tests/Drupal/Tests/Component/Utility/XssTest.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -504,8 +504,8 @@ public function testAttribute($value, $expected, $message, $allowed_tags = NULL)
  public function providerTestAttributes() {
    return [
      [
        '<img src="http://example.com/foo.jpg" title="Example: title" alt="Example: alt">',
        '<img src="http://example.com/foo.jpg" title="Example: title" alt="Example: alt">',
        '<img src="http://example.com/foo.jpg" title="Example: title" alt="Example: alt" class="md:block">',
        '<img src="http://example.com/foo.jpg" title="Example: title" alt="Example: alt" class="md:block">',
        'Image tag with alt and title attribute',
        ['img'],
      ],