LibWeb: Fix broken parsing of </form> during "in body" insertion

This commit is contained in:
Andreas Kling 2020-06-15 20:29:04 +02:00
parent 9bb4020195
commit 49cd03be95
Notes: sideshowbarker 2024-07-19 05:38:14 +09:00

View file

@ -1076,7 +1076,7 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token)
if (!m_stack_of_open_elements.contains(HTML::TagNames::template_)) {
auto node = m_form_element;
m_form_element = nullptr;
if (!node || m_stack_of_open_elements.has_in_scope(*node)) {
if (!node || !m_stack_of_open_elements.has_in_scope(*node)) {
PARSE_ERROR();
return;
}