From ad642bc0ab3f7394fe6234b72184a100fadb6862 Mon Sep 17 00:00:00 2001 From: floriankilian <34104015+floriankilian@users.noreply.github.com> Date: Fri, 18 Jul 2025 02:56:30 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20Regex=20to=20allow=20Umlaute=20"=C3=BC?= =?UTF-8?q?=C3=9C"=20in=20username=20(#1466)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description: Modified the regex pattern & full unicode support (/u) 1) Allow Umlaute "üÜ" in usernames on client-side 2) Allow Umlaute "üÜ" in usernames on server-side Before only the name "üÜüÜ" would have been possible as the pattern was |üÜ -> or "üÜ" as a combined sequence |[üÜ] -> or either one of these letters ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [ ] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I have read and accepted the CLA aggreement (only required once). Not 100% sure what/where else to test. I started couple of private lobbies with various names. ## Please put your Discord username so you can be contacted if a bug or regression is found: [UN nvm] --- src/core/Schemas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Schemas.ts b/src/core/Schemas.ts index 9c359b41e..bf6d6a30d 100644 --- a/src/core/Schemas.ts +++ b/src/core/Schemas.ts @@ -162,7 +162,7 @@ export const TeamSchema = z.string(); const SafeString = z .string() .regex( - /^([a-zA-Z0-9\s.,!?@#$%&*()\-_+=[\]{}|;:"'/\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]|üÜ])*$/, + /^([a-zA-Z0-9\s.,!?@#$%&*()\-_+=[\]{}|;:"'/\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]|[üÜ])*$/u, ) .max(1000);