diff --git a/wp-includes/html-api/class-wp-html-processor.php b/wp-includes/html-api/class-wp-html-processor.php
index d64574e2a8..ba03ff44d7 100644
--- a/wp-includes/html-api/class-wp-html-processor.php
+++ b/wp-includes/html-api/class-wp-html-processor.php
@@ -1760,6 +1760,11 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
case '+META':
$this->insert_html_element( $this->state->current_token );
+ // All following conditions depend on "tentative" encoding confidence.
+ if ( 'tentative' !== $this->state->encoding_confidence ) {
+ return true;
+ }
+
/*
* > If the active speculative HTML parser is null, then:
* > - If the element has a charset attribute, and getting an encoding from
@@ -1767,7 +1772,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
* > tentative, then change the encoding to the resulting encoding.
*/
$charset = $this->get_attribute( 'charset' );
- if ( is_string( $charset ) && 'tentative' === $this->state->encoding_confidence ) {
+ if ( is_string( $charset ) ) {
$this->bail( 'Cannot yet process META tags with charset to determine encoding.' );
}
@@ -1784,8 +1789,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
if (
is_string( $http_equiv ) &&
is_string( $content ) &&
- 0 === strcasecmp( $http_equiv, 'Content-Type' ) &&
- 'tentative' === $this->state->encoding_confidence
+ 0 === strcasecmp( $http_equiv, 'Content-Type' )
) {
$this->bail( 'Cannot yet process META tags with http-equiv Content-Type to determine encoding.' );
}
diff --git a/wp-includes/version.php b/wp-includes/version.php
index bfd7384264..cbffc2b53d 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.9-alpha-60501';
+$wp_version = '6.9-alpha-60502';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.