Ticket #22813: 22813.diff
File 22813.diff, 833 bytes (added by , 12 years ago) |
---|
-
wp-includes/formatting.php
841 841 */ 842 842 function sanitize_file_name( $filename ) { 843 843 $filename_raw = $filename; 844 $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0));844 $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", "+", chr(0)); 845 845 $special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw); 846 846 $filename = str_replace($special_chars, '', $filename); 847 847 $filename = preg_replace('/[\s-]+/', '-', $filename);