diff options
author | Kyle McLean <kylem590@gmail.com> | 2020-06-03 23:03:19 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-04 09:09:33 +0200 |
commit | 22521e57fdd70f578a813d5a7210195015e52918 (patch) | |
tree | 725e37a60e179fc23ab7c3b764aa5ff12927b019 /Libraries | |
parent | 4edd0643a6607deaa3b7a1123452108c8e89174b (diff) | |
download | serenity-22521e57fdd70f578a813d5a7210195015e52918.zip |
LibWeb: Handle "form" end tag during "in body" if stack of open elements does not contain "template"
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibWeb/Parser/HTMLDocumentParser.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp index 60d290f08f..39701f567f 100644 --- a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp +++ b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp @@ -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; } |