From e0fa795d499b725782a9816821f9ccfb0a50e266 Mon Sep 17 00:00:00 2001
From: whyisjake
Date: Wed, 29 Apr 2020 16:45: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.6 branch.
Props: nickdaugherty, batmoo, whyisjake, westi.
Built from https://develop.svn.wordpress.org/branches/4.6@47655
git-svn-id: http://core.svn.wordpress.org/branches/4.6@47432 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 6c53eabb78..7ee3c059ac 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 '
';
}