summary refs log tree commit diff
path: root/util/src/entities/Member.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/entities/Member.ts')
-rw-r--r--util/src/entities/Member.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/util/src/entities/Member.ts b/util/src/entities/Member.ts
index 8529398b..c2bc65c4 100644
--- a/util/src/entities/Member.ts
+++ b/util/src/entities/Member.ts
@@ -74,7 +74,13 @@ export class Member extends BaseClassWithoutId {
 	nick?: string;
 
 	setNick(val: string) {
-		if (val && BannedWords.find(val)) throw FieldErrors({ nick: { message: "Bad nickname", code: "INVALID_NICKNAME" } });
+
+		if (val) {
+			val = val.split("\n").join("");
+			val = val.split("\t").join("");
+			if (BannedWords.find(val)) throw FieldErrors({ nick: { message: "Bad nickname", code: "INVALID_NICKNAME" } });
+		}
+		
 		this.nick = val;
 	}