diff --git a/src/main/java/com/sparrowwallet/sparrow/control/WalletNameDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/WalletNameDialog.java index a7f8a996..c628766d 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/WalletNameDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/WalletNameDialog.java @@ -53,6 +53,10 @@ public class WalletNameDialog extends Dialog final VBox content = new VBox(20); name = (CustomTextField)TextFields.createClearableTextField(); name.setText(initialName); + name.setTextFormatter(new TextFormatter<>((change) -> { + change.setText(change.getText().replaceAll("[\\\\/:*?\"<>|]", "_")); + return change; + })); content.getChildren().add(name); HBox existingBox = new HBox(10);