[RN] Strip spaces when parsing URLs
This commit is contained in:
parent
bdf2ecfe4b
commit
a23eec55e8
|
@ -177,6 +177,9 @@ export function parseStandardURIString(str: string) {
|
||||||
let regex;
|
let regex;
|
||||||
let match: Array<string> | null;
|
let match: Array<string> | null;
|
||||||
|
|
||||||
|
// cleanup spaces
|
||||||
|
str = str.replace(/\s/g, '');
|
||||||
|
|
||||||
// protocol
|
// protocol
|
||||||
regex = new RegExp(`^${_URI_PROTOCOL_PATTERN}`, 'gi');
|
regex = new RegExp(`^${_URI_PROTOCOL_PATTERN}`, 'gi');
|
||||||
match = regex.exec(str);
|
match = regex.exec(str);
|
||||||
|
|
Loading…
Reference in New Issue