Add capacitor:// to protocol check to prevent malformed double-url issue in capacitor

This commit is contained in:
Josh Black 2021-06-02 12:30:33 +01:00
parent 3dc66c3a43
commit cea3d45719
2 changed files with 2 additions and 2 deletions

View file

@ -86,7 +86,7 @@ var File = new Class({
{
url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');
}
else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/))
else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/))
{
url = loader.path + url;
}

View file

@ -22,7 +22,7 @@ var GetURL = function (file, baseURL)
return false;
}
if (file.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/))
if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/))
{
return file.url;
}