fixed issues with certain characters in user names

This commit is contained in:
Samuel Kent
2024-02-03 09:58:56 +11:00
parent 42cf703556
commit d03d5b0fd9
5 changed files with 25 additions and 7 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
function userInfoToClient(userInfo) {
for (const user in userInfo) {
const userId = user.replaceAll(" ","_");
re = new RegExp("\\W","g");
const userId = user.replaceAll(re,"_");
if ($("#userListPanel").find("#"+userId).length >= 1) {
//update buzzer icon of existing user
$("#userListPanel").find("#"+userId).find("img").attr("data-buzzerId",userInfo[user].buzzerId);