PluginProbe
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score / 3.6.3
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score v3.6.3
trunk 1.0 1.0.1 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1 2.1.1 2.1.2 2.2 2.2.1 All 69 releases
← All changes | includes/classes/CDN.php +2 -1 trunk3.6.3 View file →
@@ -154,9 +154,9 @@
154 154 if ( ! is_string( $contents ) || empty( self::get_file_extensions() ) ) {
155 155 return $contents;
156 156 }
157 157
158 - $included_file_extensions_regex = implode( '|', array_map( 'preg_quote', self::get_file_extensions() ) );
158 + $included_file_extensions_regex = quotemeta( implode( '|', self::get_file_extensions() ) );
159 159 $urls_regex = '#(?:(?:[\"\'\s=>,;]|url\()\K|^)[^\"\'\s(=>,;]+(' . $included_file_extensions_regex . ')(\?[^\/?\\\"\'\s)>,]+)?(?:(?=\/?[?\\\"\'\s)>,&])|$)#i';
160 160 $rewritten_contents = preg_replace_callback( $urls_regex, [ '\PoweredCache\CDN', 'rewrite_url' ], $contents );
161 161
162 162 return $rewritten_contents;
@@ -400,4 +400,5 @@
400 400 return $file_extensions;
401 401 }
402 402
403 403 }
404 +