Skip to content

Commit

Permalink
Disallow certain chracters but allow spaces in the filename
Browse files Browse the repository at this point in the history
  • Loading branch information
mendhak committed Nov 5, 2023
1 parent 06e0868 commit 85f695c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void requestToggleLogging() {
formElements.add(Input.plain(PreferenceNames.CUSTOM_FILE_NAME)
.required()
// Don't allow *, &, %, / or \ in the file name.
.validatePattern("^[^*&%/\\]+$", "Invalid file name")
.validatePattern("^[^*&%/\\\\]+$", "Invalid file name")
.suggest(new ArrayList<>(cachedList))
.text(preferenceHelper.getCustomFileName())
);
Expand Down

0 comments on commit 85f695c

Please sign in to comment.