summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Brill <opensource@christophbrill.de>2022-12-09 20:02:13 +0100
committerChristoph Brill <opensource@christophbrill.de>2022-12-09 20:02:13 +0100
commit25f4017a748f4070e38400090183cc65493f83a5 (patch)
tree2b8ea9724d5a7d0ccb67b443a9d7015bf8c8df2a
parent9eb0fbdc742b0b378ec0af0a33c21af16031f442 (diff)
bug: Better handle style class names
-rw-r--r--js/script.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/script.js b/js/script.js
index 48b4027..c297b97 100644
--- a/js/script.js
+++ b/js/script.js
@@ -8,7 +8,7 @@ async function digestMessage(username) {
function toggleUser(username) {
const colorlist = document.getElementById('usernames');
- const username_clean = username.replace('|', '_');
+ const username_clean = username.replace(/[^A-Za-z0-9]/g, '_');
// The user was already in the list
if (document.mainform.highlight_names.value.indexOf(username) >= 0) {