Web IDE allows filenames ending with space

Files and folders ending with space are problematic (e.g. example ) particularly for Windows and cannot easily be deleted. It would be highly unusual to want to create a filename with a leading or trailing space.

GitLab should prevent this in the Web IDE.

Steps to reproduce

  1. Create a file with example.md (trailing space)
  2. Note that the space isn't visible anywhere
  3. Commit the change
  4. Open the rename file interface in the Web IDE and notice there is no trailing space.

Proposal

Trim trailing and leading spaces when creating or renaming files and folders.

Links / references

https://superuser.com/questions/565334/rename-delete-windows-x64-folder-with-leading-and-trailing-space

Edited by James Ramsay (ex-GitLab)