diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index b716c6bc1f..230a67aec0 100644
|
a
|
b
|
function sanitize_file_name( $filename ) { |
| 2017 | 2017 | */ |
| 2018 | 2018 | $special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw ); |
| 2019 | 2019 | |
| 2020 | | $filename = str_replace( $special_chars, '', $filename ); |
| 2021 | 2020 | $filename = str_replace( array( '%20', '+' ), '-', $filename ); |
| | 2021 | $filename = str_replace( $special_chars, '', $filename ); |
| 2022 | 2022 | $filename = preg_replace( '/[\r\n\t -]+/', '-', $filename ); |
| 2023 | 2023 | $filename = trim( $filename, '.-_' ); |
| 2024 | 2024 | |