stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
8.45k stars 751 forks source link

Validate custom locale and javascript strings #4893

Closed WithoutPants closed 3 weeks ago

WithoutPants commented 1 month ago

Resolves #4841 (in terms of improving UX when invalid code is input)

Validates the custom localisation string and displays an error if it is invalid: image

It will not be possible to save the string if it has errors.

Validates the custom javascript string for syntax errors, and displays an error if it is invalid: image

No validation is performed for custom css as I could find no simple way to do it.