Skip to content

Commit 0b386b2

Browse files
authored
Merge pull request #4144 from headlamp-k8s/prevent-opening-certain-urls-in-external-browser
app: Fix url decoding for external links handling
2 parents 09d1760 + 7fb7951 commit 0b386b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/electron/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,8 @@ function startElecron() {
15791579
if a library is trying to open a url other than app url in electron take it
15801580
to the default browser
15811581
*/
1582-
mainWindow.webContents.on('will-navigate', (event, url) => {
1582+
mainWindow.webContents.on('will-navigate', (event, encodedUrl) => {
1583+
const url = decodeURI(encodedUrl);
15831584
if (url.startsWith(startUrl)) {
15841585
return;
15851586
}

0 commit comments

Comments
 (0)