Skip to content

Commit 5c3692e

Browse files
committed
Replace the encoded space (%20) too
1 parent 3b201f7 commit 5c3692e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inc/front/enqueue.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function rocket_browser_cache_busting( $src, $current_filter = '' ) {
8888
*
8989
* @param string $filename filename for the cache busting file
9090
*/
91-
$cache_busting_filename = apply_filters( 'rocket_cache_busting_filename', preg_replace( '/\.(js|css)\?ver=(.+)$/', '-$2.$1', rtrim( str_replace( array( '/', ' ' ), '-', $relative_src_path ) ) ) );
91+
$cache_busting_filename = apply_filters( 'rocket_cache_busting_filename', preg_replace( '/\.(js|css)\?ver=(.+)$/', '-$2.$1', rtrim( str_replace( array( '/', ' ', '%20' ), '-', $relative_src_path ) ) ) );
9292
$cache_busting_paths = rocket_get_cache_busting_paths( $cache_busting_filename, $extension );
9393

9494
if ( file_exists( $cache_busting_paths['filepath'] ) && is_readable( $cache_busting_paths['filepath'] ) ) {
@@ -178,7 +178,7 @@ function rocket_cache_dynamic_resource( $src ) {
178178
*
179179
* @param string $filename filename for the cache file
180180
*/
181-
$cache_dynamic_resource_filename = apply_filters( 'rocket_dynamic_resource_cache_filename', preg_replace( '/\.(php)$/', $extension, strtok( rtrim( str_replace( array( '/', ' ' ), '-', $relative_src_path ) ), '?' ) ) );
181+
$cache_dynamic_resource_filename = apply_filters( 'rocket_dynamic_resource_cache_filename', preg_replace( '/\.(php)$/', $extension, strtok( rtrim( str_replace( array( '/', ' ', '%20' ), '-', $relative_src_path ) ), '?' ) ) );
182182
$cache_busting_paths = rocket_get_cache_busting_paths( $cache_dynamic_resource_filename, $extension );
183183

184184
if ( file_exists( $cache_busting_paths['filepath'] ) && is_readable( $cache_busting_paths['filepath'] ) ) {

0 commit comments

Comments
 (0)