File manager issues with filenames containing ampersand symbols

Having an issue with people uploading files with names that contain ampersand symbols. (i.e. “foo & bar.jpg”)

Besides telling everyone for years on end not to do that, they still do… so nothing to solve there. but is there a fix or plugin for modx to prevent them from doing that?

A user can upload a file: foo & bar.jpg with no problems, they can link to it etc-etc-etc
They cannot rename it, they get a server file permission error. (even though it is not a server permission error)
They cannot delete it, they get a server incorrect path warning ~ even though the path shown is correct…

They CAN rename a file called “foo and bar.jpg” to “foo & bar.jpg” using the modx media browser, but it will show up on the physical disk as: “foo & bar.jpg” then they won’t even be able to select it in the modx media browser…!?

So, is there a fix or extra? is this logged as a bug?

-thanks
-sean

1 Like

How about automatically changing the filename on first upload?

FileSluggy and filetranslit are two extras that can help with such issues; but I’m sure there are more.

the problem here is that they have the & in file names because it is part of the report titles & they seem to insist on continuing to use them.

I guess a plugin will have to do.