mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +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:
parent
422e00c806
commit
3ce1af27dc
Notes:
sideshowbarker
2024-07-19 06:03:38 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3ce1af27dce
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue