Make WordPress Core


Ignore:
Timestamp:
07/24/2020 12:57:26 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Media: Filter out a few more special characters in sanitize_file_name().

Props audrasjb.
Fixes #50231.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/SanitizeFileName.php

    r47664 r48596  
    1212
    1313    function test_removes_special_chars() {
    14         $special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', chr( 0 ) );
     14        $special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', '’', '«', '»', '”', '“', chr( 0 ) );
    1515        $string        = 'test';
    1616        foreach ( $special_chars as $char ) {
Note: See TracChangeset for help on using the changeset viewer.