WordPress.org

Make WordPress Core

Ticket #12280: 12280.patch

File 12280.patch, 863 bytes (added by hakre, 4 years ago)
  • wordpress/wp-includes/formatting.php

     
    668668 */ 
    669669function sanitize_file_name( $filename ) { 
    670670        $filename_raw = $filename; 
    671         $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0)); 
     671        $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", "^", chr(0)); 
    672672        $special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw); 
    673673        $filename = str_replace($special_chars, '', $filename); 
    674674        $filename = preg_replace('/[\s-]+/', '-', $filename);