Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Strip spaces when parsing URLs

Lyubo Marinov3ec4d67a9978
diff --git a/react/features/base/util/uri.js b/react/features/base/util/uri.js
index e12e7fd023..ca2d6f6487 100644
--- a/react/features/base/util/uri.js
+++ b/react/features/base/util/uri.js
@@ -177,7 +177,11 @@ export function parseStandardURIString(str: string) {
let regex;
let match: Array<string> | null;
- // cleanup spaces
+ // XXX A URI string as defined by RFC 3986 does not contain any whitespace.
+ // Usually, a browser will have already encoded any whitespace. In order to
+ // avoid potential later problems related to whitespace in URI, strip any
+ // whitespace. Anyway, the Jitsi Meet app is not known to utilize unencoded
+ // whitespace so the stripping is deemed safe.
str = str.replace(/\s/g, '');
// protocol