Electron-156

Updated the code not to encode the URL and just validate the protocol
This commit is contained in:
Kiran Niranjan 2017-12-30 12:49:39 +05:30 committed by Kiran Niranjan
parent ed4672d0bc
commit 2c3b35270b

View File

@ -291,17 +291,14 @@ function getUrlAndCreateMainWindow() {
* @param urlFromConfig
*/
function createWin(urlFromConfig) {
let protocol = '';
// add https protocol if none found.
let parsedUrl = nodeURL.parse(urlFromConfig);
if (!parsedUrl.protocol) {
protocol = 'https';
parsedUrl.protocol = 'https:';
parsedUrl.slashes = true
}
let url = nodeURL.format({
protocol: protocol,
slahes: true,
pathname: parsedUrl.href
});
let url = nodeURL.format(parsedUrl);
windowMgr.createMainWindow(url);
}