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 1828123ff879d..994b2313e78c1 100644
--- a/src/wp-includes/html-api/class-wp-html-processor.php
+++ b/src/wp-includes/html-api/class-wp-html-processor.php
@@ -1500,9 +1500,6 @@ public function serialize_token(): string {
case 'IFRAME':
case 'NOEMBED':
case 'NOFRAMES':
- $text = '';
- break;
-
case 'SCRIPT':
case 'STYLE':
case 'XMP':
diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php b/tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php
index d9d7d7c13394a..4524472742568 100644
--- a/tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php
+++ b/tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php
@@ -257,22 +257,6 @@ public function test_style_contents_are_not_escaped() {
);
}
- /**
- * XMP contents are parsed using the generic raw text element parsing algorithm.
- * Their contents should not be escaped with HTML character references on normalization.
- *
- * @ticket 65372
- */
- public function test_xmp_contents_are_not_escaped() {
- $normalized = WP_HTML_Processor::normalize( "