Changeset 48596
- Timestamp:
- 07/24/2020 12:57:26 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r48593 r48596 1986 1986 function sanitize_file_name( $filename ) { 1987 1987 $filename_raw = $filename; 1988 $special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', chr( 0 ) );1988 $special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', '’', '«', '»', '”', '“', chr( 0 ) ); 1989 1989 1990 1990 // Check for support for utf8 in the installed PCRE library once and store the result in a static. -
trunk/tests/phpunit/tests/formatting/SanitizeFileName.php
r47664 r48596 12 12 13 13 function test_removes_special_chars() { 14 $special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', chr( 0 ) );14 $special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', '’', '«', '»', '”', '“', chr( 0 ) ); 15 15 $string = 'test'; 16 16 foreach ( $special_chars as $char ) {
Note: See TracChangeset
for help on using the changeset viewer.