Verified Commit e904b6e9 authored by catch's avatar catch Committed by Jess
Browse files

task: #3633157 Add test coverage for SA-CORE-2026-011

By: xjm
By: prudloff
By: fathershawn
By: larowlan
By: longwave
By: catch
By: smustgrave
(cherry picked from commit 5a224059)
parent 7529144d
Loading
Loading
Loading
Loading
Loading
+12 −0
Changes for core/tests/Drupal/Tests/Component/Utility/XssTest.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -440,6 +440,18 @@ public static function providerTestFilterXssNotNormalized(): array {
        'HTML filter attributes removal -- srcdoc attribute.',
        ['iframe'],
      ],
      [
        '<a href="foo" data-hx-on-click="alert(document.domain)">Click me!</a>',
        'alert',
        'HTML filter attributes removal -- data-hx-* attributes.',
        ['a'],
      ],
      [
        '<a href="foo" hx-on-click="alert(document.domain)">Click me!</a>',
        'alert',
        'HTML filter attributes removal -- hx-* attributes.',
        ['a'],
      ],
    ];
    return $cases;
  }