mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibWeb: Handle various self-closing tags during "in body" insertion
We can now parse self-closing "<img>" tags correctly! :^)
This commit is contained in:
parent
f69001339f
commit
2a97127faa
Notes:
sideshowbarker
2024-07-19 06:03:33 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2a97127faa6
1 changed files with 9 additions and 0 deletions
|
@ -730,6 +730,15 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token)
|
|||
return;
|
||||
}
|
||||
|
||||
if (token.is_start_tag() && token.tag_name().is_one_of("area", "br", "embed", "img", "keygen", "wbr")) {
|
||||
reconstruct_the_active_formatting_elements();
|
||||
insert_html_element(token);
|
||||
m_stack_of_open_elements.pop();
|
||||
token.acknowledge_self_closing_flag_if_set();
|
||||
m_frameset_ok = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (token.is_start_tag()) {
|
||||
reconstruct_the_active_formatting_elements();
|
||||
insert_html_element(token);
|
||||
|
|
Loading…
Add table
Reference in a new issue