Skip to content
Snippets Groups Projects
Commit 538f7699 authored by Klaus-Dieter Quibeldey-Cirkel's avatar Klaus-Dieter Quibeldey-Cirkel
Browse files

Merge branch '548-check-room-id-for-allowed-characters-during-input' into 'master'

only allow certain characters for custom shortid on input

Closes #548

See merge request arsnova/frag.jetzt!490
parents 6b8009e3 0215d0da
Branches
Tags
No related merge requests found
......@@ -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"
......
......@@ -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(() => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment