src/Charcoal/Admin/Action/Tinymce/UploadImageAction.php
public function sanitizeFilename($filename)
    {
        // Remove blacklisted caharacters
        $blacklist = ['/', '\\', '\0', '*', ':', '?', '"', '<', '>', '|', '#', '&', '!', '`', ' '];
        $filename  = str_replace($blacklist, '_', $filename);

        // Avoid hidden file
        $filename = ltrim($filename, '.');

        return $filename;
    }
public function sanitizeFilename($filename)
    {
        // Remove blacklisted caharacters
        $blacklist = ['/', '\\', '\0', '*', ':', '?', '"', '<', '>', '|', '#', '&', '!', '`', ' '];
        $filename  = str_replace($blacklist, '_', $filename);

        // Avoid hidden file
        $filename = ltrim($filename, '.');

        return $filename;
    }
public function sanitizeFilename ( $ filename ) { // Remove blacklisted caharacters $ blacklist = [ '/' , '\\' , '\0' , '*' , ':' , '?' , '"' , '<' , '>' , '|' , '#' , '&' , '!' , '`' , ' ' ] ; $ filename = str_replace ( $ blacklist , '_' , $ filename ) ; // Avoid hidden file $ filename = ltrim ( $ filename , '.' ) ; return $ filename ; }
Sanitize a filename by removing characters from a blacklist and escaping dot.

@param string $filename The filename to sanitize.
@return string The sanitized filename.
Sanitize a filename by removing characters from a blacklist and escaping dot .