UI: Add support for usernames with @ symbol

This commit is contained in:
Max Berger
2026-04-25 21:21:10 +02:00
parent 146d4b4a9a
commit f1af26a798
8 changed files with 67 additions and 36 deletions

View File

@@ -58,7 +58,7 @@ export function random_hex(length) {
export function cleanHREFinput(href_form) {
let currentTxtVal = href_form.value.trim().toLowerCase();
//Clean the HREF to remove not permitted chars
currentTxtVal = currentTxtVal.replace(/(?![0-9a-z\-\_\.])./g, '');
currentTxtVal = currentTxtVal.replace(/(?![0-9a-z\-\_\.\@])./g, '');
//Clean the HREF to remove leading . (would result in hidden directory)
currentTxtVal = currentTxtVal.replace(/^\./, '');
href_form.value = currentTxtVal;