File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2122,6 +2122,8 @@ private function step_in_body(): bool {
21222122 $ this ->close_a_p_element ();
21232123 }
21242124
2125+ $ this ->reconstruct_active_formatting_elements ();
2126+
21252127 $ this ->insert_html_element ( $ this ->state ->current_token );
21262128 return true ;
21272129
@@ -2222,6 +2224,7 @@ private function step_in_body(): bool {
22222224 }
22232225
22242226 $ this ->state ->stack_of_open_elements ->remove_node ( $ node );
2227+ return true ;
22252228 } else {
22262229 /*
22272230 * > If the stack of open elements does not have a form element in scope,
@@ -2243,7 +2246,6 @@ private function step_in_body(): bool {
22432246 $ this ->state ->stack_of_open_elements ->pop_until ( 'FORM ' );
22442247 return true ;
22452248 }
2246- break ;
22472249
22482250 /*
22492251 * > An end tag whose tag name is "p"
Original file line number Diff line number Diff line change @@ -975,6 +975,10 @@ private function base_class_next_token(): bool {
975975 }
976976
977977 if ( 'PLAINTEXT ' === $ tag_name ) {
978+ if ( WP_HTML_Processor_State::INSERTION_MODE_IN_SELECT === ( $ this ->insertion_mode ?? null ) ) {
979+ return true ;
980+ }
981+
978982 $ doc_length = strlen ( $ this ->html );
979983 $ this ->text_starts_at = $ this ->token_starts_at + $ this ->token_length ;
980984 $ this ->text_length = $ doc_length - $ this ->text_starts_at ;
You can’t perform that action at this time.
0 commit comments