diff --git a/src/app/components/shared/_dialogs/room-create/room-create.component.html b/src/app/components/shared/_dialogs/room-create/room-create.component.html
index 57793f30a2dc6eaf4dc5691c3eca8661bb96c3df..cbf650b00c22bddf22ab55fc067edd6a2d5c6202 100644
--- a/src/app/components/shared/_dialogs/room-create/room-create.component.html
+++ b/src/app/components/shared/_dialogs/room-create/room-create.component.html
@@ -26,7 +26,7 @@
     <mat-form-field *ngIf="hasCustomShortId">
       <input (focus)="eventService.makeFocusOnInputTrue()"
              (blur)="eventService.makeFocusOnInputFalse()"
-             (keypress)="resetEmptyInputs()"
+             (keyup)="resetInvalidCharacters()"
              matInput
              #customShortId
              class="input-block"
diff --git a/src/app/components/shared/_dialogs/room-create/room-create.component.ts b/src/app/components/shared/_dialogs/room-create/room-create.component.ts
index cf3586c1659fa12e2c07ed88cf69d755435b1da4..6fad33a17ea152105d5992e9c20d10d4a87f89b5 100644
--- a/src/app/components/shared/_dialogs/room-create/room-create.component.ts
+++ b/src/app/components/shared/_dialogs/room-create/room-create.component.ts
@@ -48,6 +48,12 @@ export class RoomCreateComponent implements OnInit {
     this.emptyInputs = false;
   }
 
+  resetInvalidCharacters(): void {
+    if (this.customShortIdName) {
+      this.customShortIdName = this.customShortIdName.replace(/[^a-zA-Z0-9\_\-\*\~]+/gi, '');
+    }
+  }
+
   checkLogin(longRoomName: string) {
     if (!this.user) {
       this.authenticationService.guestLogin(UserRole.CREATOR).subscribe(() => {