Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/wp-includes/html-api/class-wp-html-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,19 @@ private function step_in_body() {
$this->state->stack_of_open_elements->pop_until( $tag_name );
return true;

/*
* > A start tag whose tag name is "plaintext"
*/
case '+PLAINTEXT':
if ( ! $this->state->stack_of_open_elements->has_p_in_button_scope() ) {
$this->close_a_p_element();
}

$this->insert_html_element( $this->state->current_token );
$this->state->insertion_mode;
return true;


/*
* > An end tag whose tag name is "p"
*/
Expand Down Expand Up @@ -997,7 +1010,6 @@ private function step_in_body() {
case 'OPTGROUP':
case 'OPTION':
case 'PARAM':
case 'PLAINTEXT':
case 'PRE':
case 'RB':
case 'RP':
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/tests/html-api/wpHtmlProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ public function data_unsupported_special_in_body_tags() {
'OPTGROUP' => array( 'OPTGROUP' ),
'OPTION' => array( 'OPTION' ),
'PARAM' => array( 'PARAM' ),
'PLAINTEXT' => array( 'PLAINTEXT' ),
'PRE' => array( 'PRE' ),
'RB' => array( 'RB' ),
'RP' => array( 'RP' ),
Expand Down