瀏覽代碼

[RN] Strip spaces when parsing URLs

master
Lyubo Marinov 7 年之前
父節點
當前提交
3ec4d67a99
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      react/features/base/util/uri.js

+ 5
- 1
react/features/base/util/uri.js 查看文件

@@ -177,7 +177,11 @@ export function parseStandardURIString(str: string) {
177 177
     let regex;
178 178
     let match: Array<string> | null;
179 179
 
180
-    // cleanup spaces
180
+    // XXX A URI string as defined by RFC 3986 does not contain any whitespace.
181
+    // Usually, a browser will have already encoded any whitespace. In order to
182
+    // avoid potential later problems related to whitespace in URI, strip any
183
+    // whitespace. Anyway, the Jitsi Meet app is not known to utilize unencoded
184
+    // whitespace so the stripping is deemed safe.
181 185
     str = str.replace(/\s/g, '');
182 186
 
183 187
     // protocol

Loading…
取消
儲存