From 935ab39e8ee754735a553c74d41270df1164ae56 Mon Sep 17 00:00:00 2001
From: Jake Spurlock
Date: Wed, 29 Apr 2020 15:34:55 +0000
Subject: [PATCH] Cache API: Ensure proper escaping around the stats method in
the cache API.
Props: nickdaugherty, batmoo, whyisjake, westi.
git-svn-id: https://develop.svn.wordpress.org/trunk@47637 602fd350-edb4-49c9-b593-d223f7449a82
---
src/wp-includes/class-wp-object-cache.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wp-includes/class-wp-object-cache.php b/src/wp-includes/class-wp-object-cache.php
index fafdc8b9e5..428e453631 100644
--- a/src/wp-includes/class-wp-object-cache.php
+++ b/src/wp-includes/class-wp-object-cache.php
@@ -441,7 +441,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 '
';
}