yes, it’s what i’m using.
But i just wonder why this major feature is not native in wordpress.
Well. As far as I understood when I checked around with regards to your question, WordPress does natively filter file names that might break things or create security weaknesses.
I guess that one important reason is that some users might need to keep non-latin characters, and wouldn’t like the Russian filename “Годовой отчет 2016.docx” to be too heavily renamed. But someone else will have filenames in Japanese or …
ok got it, as wordpress has it natively, maybe a checkbox in Settings/Media already checked by default like: * I want my uploaded files sanitized
Maybe it’s a too noob approach, but i remember struggling on a website with thousands of non sanitized files before migrating…
Moderator
Yui
(@fierevere)
ゆい
I guess that one important reason is that some users might need to keep non-latin characters, and wouldn’t like the Russian filename “Годовой отчет 2016.docx” to be too heavily renamed.
we just use translteration plugins for safety
https://ru.wordpress.org/plugins/cyr3lat/
ofc, not everyone want that. But there can be problem, dependent on hosting server software settings and visitor browsers
Some suggested improvements of the built-in function sanitize_file_name() are tracked in https://core.trac.wordpress.org/ticket/39791
read the trac ;
maybe it’s better to keep going with the appropriate plugin after all.
Yeah. The main design principle of WordPress is to keep the core generic, flexible and extendable.
i agree with you to keep core generic and so,
but don’t understand when the sanitize function is already implemented in wordpress, it seems “the only” thing is to activate it or at least give the option.