diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index cce26a60c5350..c3874fa51a9a1 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -941,6 +941,18 @@ private function step_in_body() { $this->reconstruct_active_formatting_elements(); $this->insert_html_element( $this->state->current_token ); return true; + + /* + * > A start tag whose tag name is "input" + */ + case '+INPUT': + $this->reconstruct_active_formatting_elements(); + $this->insert_html_element( $this->state->current_token ); + $type_attribute = $this->get_attribute( 'type' ); + if ( null === $type_attribute || 'hidden' === strtolower( $type_attribute ) ) { + $this->state->frameset_ok = false; + } + return true; } /* @@ -980,7 +992,6 @@ private function step_in_body() { case 'HR': case 'HTML': case 'IFRAME': - case 'INPUT': case 'KEYGEN': case 'LI': case 'LINK': diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessor.php b/tests/phpunit/tests/html-api/wpHtmlProcessor.php index d9f1357b5c66f..d2cf982d72959 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessor.php @@ -176,7 +176,6 @@ public function data_unsupported_special_in_body_tags() { 'HR' => array( 'HR' ), 'HTML' => array( 'HTML' ), 'IFRAME' => array( 'IFRAME' ), - 'INPUT' => array( 'INPUT' ), 'KEYGEN' => array( 'KEYGEN' ), 'LINK' => array( 'LINK' ), 'LISTING' => array( 'LISTING' ), diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php index 15d38d6f70c6c..d4b6969685fe2 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php @@ -178,7 +178,6 @@ public function data_unsupported_elements() { 'HR', 'HTML', 'IFRAME', - 'INPUT', 'KEYGEN', // Deprecated; void. 'LINK', 'LISTING', // Deprecated, use PRE instead.