[MM-34836] Cleanse URLs of extra slashes on parsing, and add the image proxy case (#1560)
* [MM-34836] Cleanse URLs of extra slashes on parsing, and add the image proxy case * Added unit tests
This commit is contained in:
@@ -40,7 +40,7 @@ function parseURL(inputURL) {
|
||||
return inputURL;
|
||||
}
|
||||
try {
|
||||
return new URL(inputURL);
|
||||
return new URL(inputURL.replace(/([^:]\/)\/+/g, '$1'));
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user