Closed (duplicate)
Project:
Drupal core
Version:
11.x-dev
Component:
other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2023 at 16:58 UTC
Updated:
10 Apr 2025 at 10:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
minoroffense commentedHere's a patch to allow the element.
Comment #3
minoroffense commentedComment #4
tanuj. commentedTested patch #2 with Drupal:10.1.x, patch applied successfully and solved the issue of
<data>element getting removed in view.adding screenshots of view element and before and after applying patch #2. RTBC +1
Comment #5
smustgrave commentedNext step would be to add a test assertion for it also.
Comment #7
acbramley commentedAt least needs a reroll, a similar issue popped up today in slack #3443360: Xss::filterAdmin() to allow "dialog" - wondering what the use-case is for adding data elements?
Comment #8
smustgrave commentedPut the related issue into PNMI so think this should be too.
Comment #9
minoroffense commentedWe setup a view that outputs values into a table for time spent entries. The data element describes the value as seconds and the we use that to generate charts and other things.
Views strips the data element without the patch. We can’t use the raw number since we want to show the value in different formats. The display value is human friendly but the data element lets us bring along machine friendly info.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data
Comment #12
prem suthar commentedRe-rolled The patch by mr .
Comment #13
prem suthar commentedComment #14
smustgrave commentedStill needs tests
Comment #16
arunkumarkAs per the comment #14 added test.
Comment #17
arunkumarkComment #18
smustgrave commentedWas actually thinking of actual filtering tests, like in XssTest.php
Comment #19
arunkumark@smustgrave Do we require XssTest.php kind of test for an additional
<data>tag? Because additional tags like cite, code, quote are added in the Admin Filter test only onFilterAdminTest.php.Comment #20
duaelfrProgress has been made in #2776667: Review/update $adminTags variable for new html elements to be allowed