From 12a3d2c5c3ad42b8b236117f9a767824d832cc3a Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 17 Sep 2021 23:45:43 +0100 Subject: Sanitize room name --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'index.html') diff --git a/index.html b/index.html index 8763b15..6f0d102 100644 --- a/index.html +++ b/index.html @@ -35,7 +35,9 @@ $('#roomName') .val(DEFAULT_ROOM_NAME) .on("input", function () { - generator.updateRoomName(this.value); + let value = this.value.replace(/\W/g, ''); // sanitize + this.value = value; + generator.updateRoomName(value); }); // Regenerate random room name -- cgit v1.2.3