I would like to upload a PDF file with spaces in it, and I want to do this using the uploader in the rich text editor (really, I want other, less savvy people to be able to do it, so convoluted workarounds are not really an option). Trouble is, WordPress (3.0.3) insists on replacing spaces with hyphens and lowercasing everything (despite the fact that it’s just not necessary).
Can I stop this? Turn it off? Or is there an extension to thwart this behaviour? Even a manual edit to the PHP might be okay, if there’s no alternative.
“despite the fact that it’s just not necessary”
I think you’d be surprised by how unnecessary looking stuff has a tendency of becoming absolutely necessary on some poorly configured servers.
Else yes, it can be overridden using filters. You’re looking into overriding the stuff in
sanitize_file_name()
, which is located in wp-includes/formatting.php.