Skip to content

Fix some streaming-sanitizer/adoption-agency edge cases - #61987

Merged
chromium-wpt-export-bot merged 1 commit into
masterfrom
chromium-export-cl-8250959
Aug 17, 2026
Merged

Fix some streaming-sanitizer/adoption-agency edge cases#61987
chromium-wpt-export-bot merged 1 commit into
masterfrom
chromium-export-cl-8250959

Conversation

@chromium-wpt-export-bot

@chromium-wpt-export-bot chromium-wpt-export-bot commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Sanitization should take place while performing the adoption agency
algorithm, otherwise some nodes can be missed.

Since adoption agency often adds an intermediate element,
the ReplaceWithChildren directive essentially negates it,
while Remove reparents the children into the intermediate
element and removes all of them.

This is in line with spec changes made as part of
whatwg/html#12756

Bug: 498272014
Change-Id: Ieb755555635e197f8ed7daf06a08679a0f2d38c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8250959
Commit-Queue: Noam Rosenthal <nrosenthal@google.com>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1680770}

Sanitization should take place while performing the adoption agency
algorithm, otherwise some nodes can be missed.

Since adoption agency often adds an intermediate element,
the ReplaceWithChildren directive essentially negates it,
while Remove reparents the children into the intermediate
element and removes all of them.

This is in line with spec changes made as part of
whatwg/html#12756

Bug: 498272014
Change-Id: Ieb755555635e197f8ed7daf06a08679a0f2d38c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8250959
Commit-Queue: Noam Rosenthal <nrosenthal@google.com>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1680770}

@wpt-pr-bot wpt-pr-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot
chromium-wpt-export-bot merged commit 4409cc2 into master Aug 17, 2026
19 checks passed
@chromium-wpt-export-bot
chromium-wpt-export-bot deleted the chromium-export-cl-8250959 branch August 17, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants