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.
When determining the initial tokenizer state during fragment parsing for a
noscriptelement we should use the scripting flag of thenoscriptelement, not that of the fragment parser. Scripting is always disabled in the fragment parsing case, because theDocumentFragmentnever has a browsing context.html5ever/html5ever/src/tree_builder/mod.rs
Lines 252 to 258 in 6b3601a
This causes a failure in
/html/syntax/parsing-html-fragments/tokenizer-modes-001.html.For context, see servo/servo#35848.