Skip to content

Commit 2e800b1

Browse files
[Sanitizer] Update the built-in to handle per-element attributes.
This adds support for per-element allow/remove attribute to the generated builtins. Previously, we'd just copy the per-element allow-list to the global allow-list. We now extend the generator script to faithfully generate the builtins. Also add a WPT test that specifically tests for defaults with per-element attributes. This is CL 4/7, which together implement the Sanitizer API: 1: crrev.com/c/7096258 - Update the built-in baseline. 2: crrev.com/c/7100560 - Update the built-in default. 3: crrev.com/c/7105682 - Update the configuration's data model. 4: crrev.com/c/7132699 - Update the built-in to handle per-element attributes. 5: crrev.com/c/7106779 - Update the core sanitization algorithm. 6: crrev.com/c/7105823 - Update the configuration modifier methods. 7: crrev.com/c/7106101 - Update flag status and remove virtual test suite. Bug: 40138584 Change-Id: I5d4ec4e156c6df899fabf540fd5b276477fbe858 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7132699 Reviewed-by: Yifan Luo <lyf@chromium.org> Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org> Cr-Commit-Position: refs/heads/main@{#1549708}
1 parent c7ea115 commit 2e800b1

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

sanitizer-api/sanitizer-basic-filtering.tentative.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,23 @@
258258
| <svg svg>
259259
| xlink href="about:blank"
260260

261+
</script>
262+
<script id="defaults-with-attributes-per-element" type="html5lib-testcases">
263+
#data
264+
<div start=1 value=5 lang=en><ol start=1 value=5 lang=en><li start=1 value=5 lang=en>xx
265+
#config
266+
"default"
267+
#document
268+
| <div>
269+
| lang="en"
270+
| <ol>
271+
| lang="en"
272+
| start="1"
273+
| <li>
274+
| lang="en"
275+
| value="5"
276+
| "xx"
277+
261278
</script>
262279
<script>
263280
for(const group of

0 commit comments

Comments
 (0)