diff --git a/web/src/interfaces/AdminInterface.ts b/web/src/interfaces/AdminInterface.ts index 50a94b19d..b8aa7a1a0 100644 --- a/web/src/interfaces/AdminInterface.ts +++ b/web/src/interfaces/AdminInterface.ts @@ -167,7 +167,9 @@ export class AdminInterface extends LitElement { return html` ${t`You're currently impersonating ${u.user.username}. Click to stop.`} ${t`Stop impersonation`} diff --git a/web/src/pages/flows/FlowListPage.ts b/web/src/pages/flows/FlowListPage.ts index 41ddc28e6..f1477f864 100644 --- a/web/src/pages/flows/FlowListPage.ts +++ b/web/src/pages/flows/FlowListPage.ts @@ -114,7 +114,9 @@ export class FlowListPage extends TablePage { }) .then((link) => { window.open( - `${link.link}?inspector&next=/%23${window.location.href}`, + `${link.link}?inspector&next=${encodeURIComponent( + `/#${window.location.href}`, + )}`, ); }); }} diff --git a/web/src/pages/flows/FlowViewPage.ts b/web/src/pages/flows/FlowViewPage.ts index a20c45f45..0610df81a 100644 --- a/web/src/pages/flows/FlowViewPage.ts +++ b/web/src/pages/flows/FlowViewPage.ts @@ -119,7 +119,11 @@ export class FlowViewPage extends LitElement { slug: this.flow.slug, }) .then((link) => { - const finalURL = `${link.link}?inspector&next=/%23${window.location.hash}`; + const finalURL = `${ + link.link + }?${encodeURI( + `inspector&next=/#${window.location.hash}`, + )}`; window.open(finalURL, "_blank"); }); }}