diff --git a/wp-includes/html-api/class-wp-html-processor.php b/wp-includes/html-api/class-wp-html-processor.php index 567b65062c..f6c561f010 100644 --- a/wp-includes/html-api/class-wp-html-processor.php +++ b/wp-includes/html-api/class-wp-html-processor.php @@ -1178,6 +1178,30 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor { $token_type = $this->get_token_type(); switch ( $token_type ) { + case '#doctype': + $doctype = $this->get_doctype_info(); + if ( null === $doctype ) { + break; + } + + $html .= 'name ) { + $html .= " {$doctype->name}"; + } + + if ( null !== $doctype->public_identifier ) { + $html .= " PUBLIC \"{$doctype->public_identifier}\""; + } + if ( null !== $doctype->system_identifier ) { + if ( null === $doctype->public_identifier ) { + $html .= ' SYSTEM'; + } + $html .= " \"{$doctype->system_identifier}\""; + } + $html .= '>'; + break; + case '#text': $html .= htmlspecialchars( $this->get_modifiable_text(), ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5, 'UTF-8' ); break; @@ -1194,10 +1218,6 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor { case '#cdata-section': $html .= "get_modifiable_text()}]]>"; break; - - case 'html': - $html .= ''; - break; } if ( '#tag' !== $token_type ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 229f55972c..63ca53aa33 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59398'; +$wp_version = '6.8-alpha-59399'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.