Quellcode durchsuchen

Revert "misc: make URL protocol matching regexes non-greedy"

This reverts commit 7c911eca96.

I'm dumb. We need global mode because otherwise lastIndex is not updated in the
regex object, which we rely upon, so this is intentional.
j8
Saúl Ibarra Corretgé vor 6 Jahren
Ursprung
Commit
6f95c50d6e
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 1
    1
      react/features/base/util/uri.js
  2. 1
    1
      react/features/deep-linking/functions.js

+ 1
- 1
react/features/base/util/uri.js Datei anzeigen

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

+ 1
- 1
react/features/deep-linking/functions.js Datei anzeigen

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

Laden…
Abbrechen
Speichern