Browse Source

[RN] Strip spaces when parsing URLs

master
Saúl Ibarra Corretgé 7 years ago
parent
commit
a23eec55e8
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      react/features/base/util/uri.js

+ 3
- 0
react/features/base/util/uri.js View File

177
     let regex;
177
     let regex;
178
     let match: Array<string> | null;
178
     let match: Array<string> | null;
179
 
179
 
180
+    // cleanup spaces
181
+    str = str.replace(/\s/g, '');
182
+
180
     // protocol
183
     // protocol
181
     regex = new RegExp(`^${_URI_PROTOCOL_PATTERN}`, 'gi');
184
     regex = new RegExp(`^${_URI_PROTOCOL_PATTERN}`, 'gi');
182
     match = regex.exec(str);
185
     match = regex.exec(str);

Loading…
Cancel
Save