diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-28 18:46:39 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-28 18:46:39 +0200 |
commit | cba5d59adcee5d08446fc1e666b73015b846dc78 (patch) | |
tree | 85e9224bce5b525ff727ef8cdf9afc5a5cb3c0ab /Libraries/LibWeb | |
parent | bb2f22577b167253fdf35cdf1009e8426d04f8f2 (diff) | |
download | serenity-cba5d59adcee5d08446fc1e666b73015b846dc78.zip |
LibWeb: Parse comments in the "in body" insertion mode
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r-- | Libraries/LibWeb/Parser/HTMLDocumentParser.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp index 98f8993052..8c37753d67 100644 --- a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp +++ b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp @@ -24,7 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -//#define PARSER_DEBUG +#define PARSER_DEBUG #include <AK/Utf32View.h> #include <LibWeb/DOM/Comment.h> @@ -632,6 +632,11 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token) return; } + if (token.is_comment()) { + insert_comment(token); + return; + } + if (token.is_end_tag() && token.tag_name() == "body") { if (!m_stack_of_open_elements.has_in_scope("body")) { ASSERT_NOT_REACHED(); |