From 816c1a6b66b904d620fbe9a8abff3d1281f7049a Mon Sep 17 00:00:00 2001 From: Jacob Killpack Date: Thu, 4 Nov 2021 09:28:15 -0700 Subject: [PATCH] Changing createCacheKey to replace _any_ characters that would violate file naming standards instead of just the handful of characters that were being replaced by default. --- src/Cache/CacheManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cache/CacheManager.php b/src/Cache/CacheManager.php index b22df30ffc..489af08a3b 100644 --- a/src/Cache/CacheManager.php +++ b/src/Cache/CacheManager.php @@ -55,7 +55,7 @@ public function createCacheKey(UriInterface $uri): string { $url = "{$uri->getHost()}{$uri->getPath()}"; - return str_replace(['/', '.', '-', '@', '+'],'_',$url); + return preg_replace('/[^a-zA-Z0-9_\.!]/', '_', $url); } /**