Skip to content

Conversation

@dyegoaurelio
Copy link

Implements detection and propagation of duplicate attributes through the tokenizer, tree builder, and TreeSink interface to support CSP (Content Security Policy) nonce validation.

This enables html5ever consumers (e.g., Servo) to properly implement step 3 of the CSP "is element nonceable" algorithm by checking the ElementFlags.had_duplicate_attrs field during nonce validation.

Reference:

@dyegoaurelio dyegoaurelio changed the title Add duplicate attribute tracking for CSP nonce validation. Add duplicate attribute tracking for CSP nonce validation Nov 29, 2025
Implements detection and propagation of duplicate attributes through
the tokenizer, tree builder, and TreeSink interface to support CSP
(Content Security Policy) nonce validation.

This enables html5ever consumers (e.g., Servo) to properly implement
step 3 of the CSP "is element nonceable" algorithm by checking the
`ElementFlags.had_duplicate_attrs` field during nonce validation.

Reference:
 - https://www.w3.org/TR/CSP/#is-element-nonceable
 - servo/servo@4821bc0
Signed-off-by: Dyego Aurélio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant