Skip to content

tokenizer_state_for_context_elem should use scripting flag of the context element, not the parser #579

Closed
@simonwuelker

Description

@simonwuelker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions