The new Media gallery introduced in the 2.4.2x series doesn't allow you to enter a hyphen or underscore when naming a newly created folder. It displays this error when you try:
"Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed."
Steps to Reproduce:
- Go to Content Menu -> Media Manager
- Click on a folder WYSIWYG folder to expand sub folders
- Select a folder to create a sub folder in. e.g. "WYSIYWG"
- Click Create Folder button
- Enter in "test-folder" or "test_folder"
- Click Confirm Error message appears.
I'm proposing Magento make a configuration file or something similar that would allow the user to whitelist characters to be allowed in a folder name. Previous versions of the gallery allowed users to put hyphens and underscores in folder names. Hyphens and underscores are commonly used in folder naming conventions. I see no security risk in allowing these specific characters. Would love to see this implemented as it doesn't seem very difficult.