statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

illegal symbols in assets name in Windows #2501

Open OleksiiBrylin opened 4 years ago

OleksiiBrylin commented 4 years ago

Mac OS user can save assets with illegal symbols through CMS. When user opens the project on Windows system the assets with illegal symbols will be as broken links.

To Reproduce Steps to reproduce the behavior:

  1. Open Statamic admin panel on Mac OS
  2. Save some file with illegal symbols (Logo_S:W.jpg)
  3. Save to git and push
  4. Pull the project on Windows OS
  5. File will be renamed to "Logo_S" without ":W.jpg"

Expected behavior When user upload a file illegal symbols should be replaced. Windows and Linux OS illegal symbols

< (less than)
> (greater than)
: (colon - sometimes works, but is actually NTFS Alternate Data Streams)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)

Environment details (please complete the following information):