When determining the initial tokenizer state during fragment parsing for a noscript element we should use the scripting flag of the noscript element, not that of the fragment parser. Scripting is always disabled in the fragment parsing case, because the DocumentFragment never has a browsing context.
|
local_name!("noscript") => { |
|
if self.opts.scripting_enabled { |
|
tok_state::RawData(tok_state::Rawtext) |
|
} else { |
|
tok_state::Data |
|
} |
|
}, |
This causes a failure in /html/syntax/parsing-html-fragments/tokenizer-modes-001.html.
For context, see servo/servo#35848.