瀏覽代碼

[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
     let regex;
177
     let regex;
178
     let match: Array<string> | null;
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
     str = str.replace(/\s/g, '');
185
     str = str.replace(/\s/g, '');
182
 
186
 
183
     // protocol
187
     // protocol

Loading…
取消
儲存