public
Last active

WordPress plugin that removes evil characters in file names

  • Download Gist
sunnytize.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?php
/*
Plugin Name: Sunnytize
Plugin URI:
Description: A better file name sanitizer
Version: 1.0
Author: Sunny Ripert
Author URI: http://sunfox.org
*/
 
function sunnytize_file_name_chars($special_chars, $filename_raw = '') {
return array_merge($special_chars, str_split('éè’ààäçéèêöôùûü£€%@+«»°'));
}
 
add_filter('sanitize_file_name_chars', 'sunnytize_file_name_chars');

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.