Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Trim leading and trailing white space from strings #4181

Closed
echo6ix opened this issue Oct 8, 2023 · 4 comments
Closed

[Feature] Trim leading and trailing white space from strings #4181

echo6ix opened this issue Oct 8, 2023 · 4 comments

Comments

@echo6ix
Copy link
Contributor

echo6ix commented Oct 8, 2023

Is your feature request related to a problem? Please describe.
I unknowingly created a performer with leading white space and it effected the data integrity as the performer name wasn't getting sorted properly. I think it's just good practice to sanitize all user and scraper submitted strings by removing any leading and trailing white space.

Describe the solution you'd like
Trim leading and trailing white space from all strings entered by a user or entered through scraping (assuming it doesn't already for scraping).

https://pkg.go.dev/strings#TrimSpace

@RndOrc
Copy link

RndOrc commented Oct 10, 2023

Worth noting that if this applies to tag names, it would break the manual ordering of tags that some users achieve by using leading white space in tag names. It would be very nice to have an alternate solution for tag ordering and categorization available if this gets applied to tags as well.

@xantror
Copy link

xantror commented Oct 10, 2023

Maybe a toggle Trim whitespace before sorting/filtering.

Have yet to see this, but some sites might potentially support usernames with leading/trailing spaces, which would make it hard to input the "correct" names/aliases were all whitespace to be trimmed from strings indiscriminately.

@Ronnie711
Copy link

#3262

Linking duplicate ....

@echo6ix
Copy link
Contributor Author

echo6ix commented Jan 6, 2024

Closing because duplicate.

@echo6ix echo6ix closed this as completed Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants