1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:55:06 +00:00

LibWeb: Parse documents without DOCTYPE gracefully

Seems like SOMEONE forgot to put a <!DOCTYPE html> on serenityos.org..
No matter, now we can handle it in the new parser! :^)
This commit is contained in:
Andreas Kling 2020-05-28 00:21:31 +02:00
parent 422e00c806
commit 3ce1af27dc

View file

@ -142,7 +142,11 @@ void HTMLDocumentParser::handle_initial(HTMLToken& token)
m_insertion_mode = InsertionMode::BeforeHTML;
return;
}
ASSERT_NOT_REACHED();
PARSE_ERROR();
document().set_quirks_mode(true);
m_insertion_mode = InsertionMode::BeforeHTML;
process_using_the_rules_for(InsertionMode::BeforeHTML, token);
}
void HTMLDocumentParser::handle_before_html(HTMLToken& token)