fix(front): allow dash in whiteboard id

* prevent transformation of uuid
This commit is contained in:
Florent Chehab 2020-05-12 20:32:40 +02:00
parent 0240171d0e
commit b11520788e
No known key found for this signature in database
GPG Key ID: 9A0CE018889EA246
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ if (randomid && !whiteboardId) {
}
whiteboardId = whiteboardId || "myNewWhiteboard";
whiteboardId = unescape(encodeURIComponent(whiteboardId)).replace(/[^a-zA-Z0-9 ]/g, "");
whiteboardId = unescape(encodeURIComponent(whiteboardId)).replace(/[^a-zA-Z0-9\-]/g, "");
const myUsername = getQueryVariable("username") || "unknown" + (Math.random() + "").substring(2, 6);
const accessToken = getQueryVariable("accesstoken") || "";