mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +00:00
LibWeb: Handle "form" end tag during "in body" if stack of open elements does not contain "template"
This commit is contained in:
parent
4edd0643a6
commit
22521e57fd
Notes:
sideshowbarker
2024-07-19 05:51:05 +09:00
Author: https://github.com/kylemclean
Commit: 22521e57fd
Pull-request: https://github.com/SerenityOS/serenity/pull/2491
1 changed files with 9 additions and 1 deletions
|
@ -1061,7 +1061,15 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token)
|
|||
}
|
||||
m_stack_of_open_elements.elements().remove_first_matching([&](auto& entry) { return entry.ptr() == node.ptr(); });
|
||||
} else {
|
||||
TODO();
|
||||
if (!m_stack_of_open_elements.has_in_scope("form")) {
|
||||
PARSE_ERROR();
|
||||
return;
|
||||
}
|
||||
generate_implied_end_tags();
|
||||
if (current_node().tag_name() != "form") {
|
||||
PARSE_ERROR();
|
||||
}
|
||||
m_stack_of_open_elements.pop_until_an_element_with_tag_name_has_been_popped("form");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue