[wpt-sync] Sync PR 61750 - Support sanitization using <template for="..." sanitize>
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 61750 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/61750
Details from upstream follow.
Noam Rosenthal <nrosenthal@chromium.org> wrote:
Support sanitization using <template for="..." sanitize>
The sanitize boolean attribute makes all the descendants go through
baseline sanitization (removing scripts and unknown attributes).The Sanitizer instance created for those intermediate templates are a
"safe clone" of the main parser sanitizer, or a "safe baseline"
sanitizer if that isn't present.This is guarded by the DeclarativeFragment flag, and is meant for
experimenting and developer feedback at this point.Bug: 535664974
Change-Id: I2e9b4f5753e4043cff348ff2b975d1f1f3f73e0e
Reviewed-on: https://chromium-review.googlesource.com/8125134
WPT-Export-Revision: bb015774d475e2080c082b70cdf9e9ab35b39744
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Comment 1•3 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=a73221e7735c0d5d9b3a1246080164b6d1f0b8ec
| Assignee | ||
Comment 2•3 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 14 tests and 1 subtests
Status Summary
Firefox
OK : 6[GitHub] 14[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 5
FAIL: 6[GitHub] 15[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 6
PASS: 4
FAIL: 7
Safari
OK : 6
PASS: 3
FAIL: 8
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/dom/partial-updates/tentative/fragment/buffer-immutability.html [wpt.fyi]
- Modifying 'for' or 'buffer' attributes dynamically after start tag has no effect on the inclusion behavior:
FAIL
- Modifying 'for' or 'buffer' attributes dynamically after start tag has no effect on the inclusion behavior:
- /html/dom/partial-updates/tentative/fragment/buffer-in-place.html [wpt.fyi]
- In-place template with buffer attribute buffers children and inserts them atomically at finalization:
FAIL
- In-place template with buffer attribute buffers children and inserts them atomically at finalization:
- /html/dom/partial-updates/tentative/fragment/buffer-mutation-observer.html [wpt.fyi]
- Targeted template with buffer attribute triggers atomic MutationObserver records:
FAIL
- Targeted template with buffer attribute triggers atomic MutationObserver records:
- /html/dom/partial-updates/tentative/fragment/buffer-reflection.html [wpt.fyi]
- HTMLTemplateElement.buffer IDL attribute reflects the buffer content attribute:
FAIL
- HTMLTemplateElement.buffer IDL attribute reflects the buffer content attribute:
- /html/dom/partial-updates/tentative/fragment/buffer-streaming-reflection.html [wpt.fyi]
- template.content reflects the buffered content progressively while streaming:
FAIL
- template.content reflects the buffered content progressively while streaming:
- /html/dom/partial-updates/tentative/fragment/buffer-targeted.html [wpt.fyi]
- Targeted template with buffer attribute buffers children and replaces target content atomically at finalization:
FAIL
- Targeted template with buffer attribute buffers children and replaces target content atomically at finalization:
- /html/dom/partial-updates/tentative/fragment/empty-for-streaming.html [wpt.fyi]
- In-place template with empty for attribute is removed and its children are inserted before it:
FAIL - In-place template moving and removal during streaming:
FAIL
- In-place template with empty for attribute is removed and its children are inserted before it:
- /html/dom/partial-updates/tentative/fragment/sanitize-boolean.html [wpt.fyi]
- The sanitize attribute behaves like a boolean attribute:
FAIL(Chrome:FAIL, Safari:FAIL)
- The sanitize attribute behaves like a boolean attribute:
- /html/dom/partial-updates/tentative/fragment/sanitize-default.html [wpt.fyi]
- Template with empty sanitize attribute applies default safe sanitization and discards script tags:
FAIL(Chrome:FAIL, Safari:FAIL)
- Template with empty sanitize attribute applies default safe sanitization and discards script tags:
- /html/dom/partial-updates/tentative/fragment/sanitize-nested.html [wpt.fyi]
- Declarative Fragment: nested sanitization combinations:
FAIL(Chrome:FAIL, Safari:FAIL) - Safe template nested inside unsafe template under bespoke main sanitizer:
FAIL(Chrome:FAIL, Safari:FAIL)
- Declarative Fragment: nested sanitization combinations:
- /html/dom/partial-updates/tentative/fragment/sanitize-template-element.html [wpt.fyi]
- Template with sanitize attribute should not strip itself when nested:
FAIL(Chrome:FAIL, Safari:FAIL)
- Template with sanitize attribute should not strip itself when nested:
- /html/dom/partial-updates/tentative/fragment/sanitize-unsafe.html [wpt.fyi]
- Template with non-empty sanitize attribute values (unsafe or invalid) bypasses safe sanitization and allows script tags:
FAIL(Chrome:PASS, Safari:FAIL)
- Template with non-empty sanitize attribute values (unsafe or invalid) bypasses safe sanitization and allows script tags:
- /html/dom/partial-updates/tentative/fragment/streaming-target-marker-removed.html [wpt.fyi]
- Streaming target end marker can be removed mid-stream safely, falling back to appending:
FAIL
- Streaming target end marker can be removed mid-stream safely, falling back to appending:
Comment 4•3 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c3339e02f926
https://hg.mozilla.org/mozilla-central/rev/ea5d484c18fc
Description
•