Description
Describe (the bug?)
The user can currently create an object title (such as a scene or performer or tag) with leading spaces. The leading spaces don't seem to be displayed anywhere in the UI except for the edit tab of the object. This throws off sorting of objects by title as they're getting sorted by the leading space(s).
To Reproduce
Steps to reproduce the behavior:
- Go to
Scenes
- Click on 'New'
- Create the title ` XYZ'
- Save
- Sort all scenes by
Title
- You will notice the leading spaces aren't displayed
- You will also notice the object isn't sorted by XYZ, but rather the leading spaces
Expected behavior
Remove leading/trailing spaces of a title (and performer name) upon creation of an object.
Stash Version: (from Settings -> About):
v0.18.0-15-gce080c1b
Additional context
Implementing the above would fix any newly created objects going forward, but there could potentially be existing objects with leading/trailing spaces (due to accidental leading/trailing spaces or from scrapes with leading/trailing spaces.) I don't know the optimal way to implement the following, but some kind of sanitization process, perhaps when the app initializes with each new version release, to strip all leading/trailing spaces from the titles (and performer names).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status