File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Userland/Libraries/LibWeb/HTML/Parser Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -3411,6 +3411,24 @@ void HTMLParser::handle_in_select(HTMLToken& token)
3411
3411
return ;
3412
3412
}
3413
3413
3414
+ // -> A start tag whose tag name is "hr"
3415
+ if (token.is_start_tag () && token.tag_name () == HTML::TagNames::hr) {
3416
+ // If the current node is an option element, pop that node from the stack of open elements.
3417
+ if (current_node ().local_name () == HTML::TagNames::option) {
3418
+ (void )m_stack_of_open_elements.pop ();
3419
+ }
3420
+ // If the current node is an optgroup element, pop that node from the stack of open elements.
3421
+ if (current_node ().local_name () == HTML::TagNames::optgroup) {
3422
+ (void )m_stack_of_open_elements.pop ();
3423
+ }
3424
+ // Insert an HTML element for the token. Immediately pop the current node off the stack of open elements.
3425
+ (void )insert_html_element (token);
3426
+ (void )m_stack_of_open_elements.pop ();
3427
+ // Acknowledge the token's self-closing flag, if it is set.
3428
+ token.acknowledge_self_closing_flag_if_set ();
3429
+ return ;
3430
+ }
3431
+
3414
3432
if (token.is_end_tag () && token.tag_name () == HTML::TagNames::optgroup) {
3415
3433
if (current_node ().local_name () == HTML::TagNames::option && node_before_current_node ().local_name () == HTML::TagNames::optgroup)
3416
3434
(void )m_stack_of_open_elements.pop ();
You can’t perform that action at this time.
0 commit comments