mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
LibWeb: Parse "br" end tags during "in body"
This commit is contained in:
parent
9fca4b56d3
commit
1ad81e4833
Notes:
sideshowbarker
2024-07-19 05:51:15 +09:00
Author: https://github.com/kylemclean Commit: https://github.com/SerenityOS/serenity/commit/1ad81e48335 Pull-request: https://github.com/SerenityOS/serenity/pull/2491
2 changed files with 9 additions and 1 deletions
|
@ -1195,10 +1195,12 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token)
|
|||
}
|
||||
|
||||
if (token.is_end_tag() && token.tag_name() == "br") {
|
||||
TODO();
|
||||
token.drop_attributes();
|
||||
goto BRStartTag;
|
||||
}
|
||||
|
||||
if (token.is_start_tag() && token.tag_name().is_one_of("area", "br", "embed", "img", "keygen", "wbr")) {
|
||||
BRStartTag:
|
||||
reconstruct_the_active_formatting_elements();
|
||||
insert_html_element(token);
|
||||
m_stack_of_open_elements.pop();
|
||||
|
|
|
@ -123,6 +123,12 @@ public:
|
|||
return {};
|
||||
}
|
||||
|
||||
void drop_attributes()
|
||||
{
|
||||
ASSERT(is_start_tag() || is_end_tag());
|
||||
m_tag.attributes.clear();
|
||||
}
|
||||
|
||||
Type type() const { return m_type; }
|
||||
|
||||
String to_string() const;
|
||||
|
|
Loading…
Add table
Reference in a new issue