Closed Bug 2094936 Opened 14 days ago Closed 11 days ago

[wpt-sync] Sync PR 65018 - Move template sanitization to <template for src>

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 65018 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/65018
Details from upstream follow.

Noam Rosenthal <nrosenthal@chromium.org> wrote:

Move template sanitization to <template for src>

Align \<template> sanitization with the declarative fragment explainer:

  • Remove inline/main-parser per-template sanitization from
    HTMLConstructionSite and HTMLStackItem so the "sanitize" attribute
    only applies when "src" is present.
  • Apply default sanitization (empty Sanitizer + removeUnsafe(), or
    cloning the enclosing parser's Sanitizer + removeUnsafe()) to
    external fragments fetched via \<template for src>.
  • Allow opting out of the additional removeUnsafe() step via
    sanitize="unsafe", inheriting the enclosing parser context's
    sanitizer state.

Bug: 535664974
Fixed: 581892399
Change-Id: I45ed4fc31387e787823163d50d8009f429a03dbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8727130
Reviewed-by: Mason Freed \<masonf@chromium.org>
Commit-Queue: Noam Rosenthal \<nrosenthal@google.com>
Cr-Commit-Position: refs/heads/main@{#1741555}

PR 65018 applied with additional changes from upstream: 46d4468f3228c4599e4a9d7e72255ff09e632924

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 5 tests and 1 subtests

Status Summary

Firefox

OK : 2
FAIL : 4
TIMEOUT: 6
NOTRUN : 2

Chrome

OK : 5
PASS : 3
FAIL : 6

Safari

OK : 2
FAIL : 4
TIMEOUT: 6
NOTRUN : 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 11 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.