diff --git a/main.js b/main.js index 8be8516..197338c 100644 --- a/main.js +++ b/main.js @@ -162,10 +162,12 @@ function createWindow(port) { }); mainWindow.webContents.setWindowOpenHandler(({ url }) => { - if (url.startsWith(baseUrl) || !url.startsWith('http')) { + if (url.startsWith(baseUrl)) { return { action: 'allow' }; } - require('electron').shell.openExternal(url); + if (url.startsWith('http')) { + require('electron').shell.openExternal(url); + } return { action: 'deny' }; }); diff --git a/ui/app.js b/ui/app.js index c4fb694..71bfc03 100644 --- a/ui/app.js +++ b/ui/app.js @@ -1826,7 +1826,7 @@ async function executePR(relPath, branch, message, repoUrl) { `Successfully pushed to branch '${data.branch}'.\n\nWould you like to open the Pull Request page on GitHub?` ) ) { - window.open(data.pr_url, '_blank'); + window.open(data.pr_url, '_blank', 'noopener,noreferrer'); } } else { if (typeof DebuggerConsole !== 'undefined') { @@ -2821,9 +2821,10 @@ function renderSidebar() { totalScripts += filteredScripts.length; const isExpanded = state.expandedCategories.has(cat) || !!query; + const escapedCat = escapeAttr(cat); html += `