Verified Commit dbf142e9 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2692451 by neclimdul, tedfordgif, smustgrave, mikey_p, larowlan:...

Issue #2692451 by neclimdul, tedfordgif, smustgrave, mikey_p, larowlan: Xss::filterAdmin() incorrectly filters datetime attribute

(cherry picked from commit 5af2ad5f)
parent 03d37513
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -238,6 +238,7 @@ protected static function attributes($attributes) {
              'rel',
              'property',
              'class',
              'datetime',
            ]);

            $working = $mode = 1;
+18 −0
Original line number Diff line number Diff line
@@ -553,6 +553,24 @@ public function providerTestAttributes() {
        'Image tag with malformed SRC',
        ['img'],
      ],
      [
        '<del datetime="1789-08-22T12:30:00.1-04:00">deleted text</del>',
        '<del datetime="1789-08-22T12:30:00.1-04:00">deleted text</del>',
        'Del with datetime attribute',
        ['del'],
      ],
      [
        '<ins datetime="1986-01-28 11:38:00.010">inserted text</ins>',
        '<ins datetime="1986-01-28 11:38:00.010">inserted text</ins>',
        'Ins with datetime attribute',
        ['ins'],
      ],
      [
        '<time datetime="1978-11-19T05:00:00Z">#DBD</time>',
        '<time datetime="1978-11-19T05:00:00Z">#DBD</time>',
        'Time with datetime attribute',
        ['time'],
      ],
    ];
  }