From 6561987e9f6a108b18421ba675ac32fc11901c0a Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Sun, 24 May 2020 13:48:46 +0200 Subject: [PATCH] LibWeb: Fix copy-paste error in HTMLDocumentParser (#2358) When watching the video of the new HTML parser I noticed a small copy and paste error. In one of the cases in `handle_after_head` the code was checking for end tags when it should check for start tags. I haven't tested this change, just looking at the spec. --- Libraries/LibWeb/Parser/HTMLDocumentParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp index c132a750db..d3092bec42 100644 --- a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp +++ b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp @@ -214,7 +214,7 @@ void HTMLDocumentParser::handle_after_head(HTMLToken& token) { Vector names = { "base", "basefont", "bgsound", "link", "meta", "noframes", "script", "style", "template", "title" }; - if (token.is_end_tag() && names.contains_slow(token.tag_name())) { + if (token.is_start_tag() && names.contains_slow(token.tag_name())) { ASSERT_NOT_REACHED(); } }