From ef104bfdaefe69d673b0cbe8bf95e378cc523f5b Mon Sep 17 00:00:00 2001
From: whyisjake
Date: Wed, 29 Apr 2020 16:43:22 +0000
Subject: [PATCH] Cache API: Ensure proper escaping around the stats method in
the cache API.
Brings the changes in [47637] to the 4.5 branch.
Props: nickdaugherty, batmoo, whyisjake, westi.
Built from https://develop.svn.wordpress.org/branches/4.5@47654
git-svn-id: http://core.svn.wordpress.org/branches/4.5@47431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
wp-includes/cache.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wp-includes/cache.php b/wp-includes/cache.php
index a1a6e6c705..e535ef84f0 100644
--- a/wp-includes/cache.php
+++ b/wp-includes/cache.php
@@ -691,7 +691,7 @@ class WP_Object_Cache {
echo "
";
echo '';
foreach ($this->cache as $group => $cache) {
- echo "- Group: $group - ( " . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )
';
+ echo '- Group: ' . esc_html( $group ) . ' - ( ' . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )
';
}
echo '
';
}