diff options
author | Kyle McLean <kylem590@gmail.com> | 2020-06-03 22:33:10 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-04 09:09:33 +0200 |
commit | 9fca4b56d30048fb4560497a90665291eedbaae7 (patch) | |
tree | 6bc762e5bcdb56b51709ecddb29e54d7c0b89cb3 /Libraries | |
parent | 5046f15824ec591ae9c18a41c6b6680b10a41bd3 (diff) | |
download | serenity-9fca4b56d30048fb4560497a90665291eedbaae7.zip |
LibWeb: Parse end tags for "applet", "marquee", and "object" during "in body"
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibWeb/Parser/HTMLDocumentParser.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp index 25c66047b2..146e848d29 100644 --- a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp +++ b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp @@ -1169,7 +1169,18 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token) } if (token.is_end_tag() && token.tag_name().is_one_of("applet", "marquee", "object")) { - TODO(); + if (!m_stack_of_open_elements.has_in_scope(token.tag_name())) { + PARSE_ERROR(); + return; + } + + generate_implied_end_tags(); + if (current_node().tag_name() != token.tag_name()) { + PARSE_ERROR(); + } + m_stack_of_open_elements.pop_until_an_element_with_tag_name_has_been_popped(token.tag_name()); + m_list_of_active_formatting_elements.clear_up_to_the_last_marker(); + return; } if (token.is_start_tag() && token.tag_name() == "table") { |