Ticket #16226: 16226.diff
File 16226.diff, 833 bytes (added by , 14 years ago) |
---|
-
wp-includes/formatting.php
692 692 */ 693 693 function sanitize_file_name( $filename ) { 694 694 $filename_raw = $filename; 695 $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0));695 $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", '%', chr(0)); 696 696 $special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw); 697 697 $filename = str_replace($special_chars, '', $filename); 698 698 $filename = preg_replace('/[\s-]+/', '-', $filename);