[RN] Strip spaces when parsing URLs

This commit is contained in:
Lyubo Marinov 2018-01-19 15:26:13 -06:00
parent a23eec55e8
commit 3ec4d67a99
1 changed files with 5 additions and 1 deletions

View File

@ -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