Skip to content

Commit

Permalink
Teambuilder: Disallow [ and ] in team names
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed Oct 5, 2023
1 parent 8202611 commit d8f4063
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/client-teambuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,11 @@
app.addPopupMessage("Names can't contain the character |, since they're used for storing teams.");
name = name.replace(/\|/g, '');
}
if (name.indexOf('[') >= 0 || name.indexOf(']') >= 0) {
app.addPopupMessage("Names can't contain the characters [ or ], since they're used for storing team IDs.");
name = name.replace(/\[/g, '');
name = name.replace(/\]/g, '');
}
this.curTeam.name = name;
e.currentTarget.value = name;
this.save();
Expand Down

0 comments on commit d8f4063

Please sign in to comment.