| @@ -416,9 +416,10 @@ | ||
| 416 | 416 | // Now filename. |
| 417 | 417 | $filename_include = isset( $include['filename'] ) ? $include['filename'] : array(); |
| 418 | 418 | if ( is_array( $filename_include ) && count( $filename_include ) && 'file' === $type ) { |
| 419 | 419 | foreach ( $filename_include as $filename ) { |
| 420 | - if ( preg_match( '/' . $filename . '/', pathinfo( $path, PATHINFO_BASENAME ) ) ) { | |
| 420 | + $pattern = '/' . preg_quote( $filename, '/' ) . '/'; | |
| 421 | + if ( preg_match( $pattern, pathinfo( $path, PATHINFO_BASENAME ) ) ) { | |
| 421 | 422 | return true; |
| 422 | 423 | } |
| 423 | 424 | } |
| 424 | 425 | ++$applied; |