fix: SDA-1530 (Fix url validation check) (#789)

* SDA-1530 - Fix url validation check

* SDA-1530 - Bump spellchecker to support open link validation

* SDA-1530 - bump spellchecker version to 2.3.0

* SDA-1530 - add comment
This commit is contained in:
Kiran Niranjan 2019-10-14 19:57:23 +05:30 committed by Vishwas Shashidhar
parent 1e8afb17ab
commit ec863bc240
2 changed files with 5 additions and 3 deletions

View File

@ -76,7 +76,7 @@
"electron-dl": "1.14.0",
"electron-fetch": "1.3.0",
"electron-log": "3.0.7",
"electron-spellchecker": "git+https://github.com/symphonyoss/electron-spellchecker.git#v2.0.1",
"electron-spellchecker": "git+https://github.com/symphonyoss/electron-spellchecker.git#v2.3.0",
"ffi-napi": "2.4.5",
"filesize": "4.1.2",
"react": "16.9.0",

View File

@ -39,12 +39,14 @@ const verifyProtocolForNewUrl = (url: string): boolean => {
return false;
}
if (parsedUrl.protocol === 'https') {
// url parse returns protocol with :
if (parsedUrl.protocol === 'https:') {
logger.info(`child-window-handler: The url ${url} is a https url! Returning true for verification!`);
return true;
}
if (parsedUrl.protocol === 'http') {
// url parse returns protocol with :
if (parsedUrl.protocol === 'http:') {
logger.info(`child-window-handler: The url ${url} is a http url! Returning true for verification!`);
return true;
}