diff options
-rw-r--r-- | Libraries/LibWeb/Parser/HTMLDocumentParser.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibWeb/Parser/HTMLToken.h | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp index 146e848d29..bfb39f9d56 100644 --- a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp +++ b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp @@ -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(); diff --git a/Libraries/LibWeb/Parser/HTMLToken.h b/Libraries/LibWeb/Parser/HTMLToken.h index 6ef33d5baf..17979eedc9 100644 --- a/Libraries/LibWeb/Parser/HTMLToken.h +++ b/Libraries/LibWeb/Parser/HTMLToken.h @@ -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; |