Przeglądaj źródła

misc: make URL protocol matching regexes non-greedy

master
Saúl Ibarra Corretgé 6 lat temu
rodzic
commit
7c911eca96

+ 1
- 1
react/features/base/util/uri.js Wyświetl plik

71
  * @returns {string}
71
  * @returns {string}
72
  */
72
  */
73
 function _fixURIStringScheme(uri: string) {
73
 function _fixURIStringScheme(uri: string) {
74
-    const regex = new RegExp(`${URI_PROTOCOL_PATTERN}+`, 'gi');
74
+    const regex = new RegExp(`${URI_PROTOCOL_PATTERN}+`, 'i');
75
     const match: Array<string> | null = regex.exec(uri);
75
     const match: Array<string> | null = regex.exec(uri);
76
 
76
 
77
     if (match) {
77
     if (match) {

+ 1
- 1
react/features/deep-linking/functions.js Wyświetl plik

45
 
45
 
46
     const appScheme = interfaceConfig.APP_SCHEME || 'org.jitsi.meet';
46
     const appScheme = interfaceConfig.APP_SCHEME || 'org.jitsi.meet';
47
     const { href } = window.location;
47
     const { href } = window.location;
48
-    const regex = new RegExp(URI_PROTOCOL_PATTERN, 'gi');
48
+    const regex = new RegExp(URI_PROTOCOL_PATTERN, 'i');
49
 
49
 
50
     // Android: use an intent link, custom schemes don't work in all browsers.
50
     // Android: use an intent link, custom schemes don't work in all browsers.
51
     // https://developer.chrome.com/multidevice/android/intents
51
     // https://developer.chrome.com/multidevice/android/intents

Ładowanie…
Anuluj
Zapisz