diff --git a/src/excmds.ts b/src/excmds.ts index c7a1ab54..7ac93837 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -1326,14 +1326,8 @@ export async function open(...urlarr: string[]) { // Open URLs that firefox won't let us by running `firefox ` on the command line return nativeopen(url) } else if (/^javascript:/.exec(url)) { - const bookmarklet = url.replace(/^javascript:/, "") - document.body.append( - html` - - `, - ) + const escapeUrl = url.replace(/[\\"]/g, "\\$&") + window.eval(`window.location.href = "${escapeUrl}"`) } else { const tab = await ownTab() return openInTab(tab, {}, urlarr)