1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:08:11 +00:00

LibWeb: Handle "form" end tag during "in body" if stack of open elements does not contain "template"

This commit is contained in:
Kyle McLean 2020-06-03 23:03:19 -06:00 committed by Andreas Kling
parent 4edd0643a6
commit 22521e57fd

View file

@ -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;
}