web: remove manually URL encoded paths
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
465898c7d0
commit
e6638afa3c
|
@ -167,7 +167,9 @@ export class AdminInterface extends LitElement {
|
|||
return html`<ak-sidebar-item
|
||||
?highlight=${true}
|
||||
?isAbsoluteLink=${true}
|
||||
path=${`/-/impersonation/end/?back=${window.location.pathname}%23${window.location.hash}`}
|
||||
path=${`/-/impersonation/end/?back=${encodeURIComponent(
|
||||
`${window.location.pathname}#${window.location.hash}`,
|
||||
)}`}
|
||||
>
|
||||
<span slot="label"
|
||||
>${t`You're currently impersonating ${u.user.username}. Click to stop.`}</span
|
||||
|
|
|
@ -222,7 +222,9 @@ export class UserInterface extends LitElement {
|
|||
<div class="pf-c-page__header-tools-group">
|
||||
<a
|
||||
class="pf-c-button pf-m-warning pf-m-small"
|
||||
href=${`/-/impersonation/end/?back=${window.location.pathname}%23${window.location.hash}`}
|
||||
href=${`/-/impersonation/end/?back=${encodeURIComponent(
|
||||
`${window.location.pathname}#${window.location.hash}`,
|
||||
)}`}
|
||||
>
|
||||
${t`Stop impersonation`}
|
||||
</a>
|
||||
|
|
|
@ -114,7 +114,9 @@ export class FlowListPage extends TablePage<Flow> {
|
|||
})
|
||||
.then((link) => {
|
||||
window.open(
|
||||
`${link.link}?inspector&next=/%23${window.location.href}`,
|
||||
`${link.link}?inspector&next=${encodeURIComponent(
|
||||
`/#${window.location.href}`,
|
||||
)}`,
|
||||
);
|
||||
});
|
||||
}}
|
||||
|
|
|
@ -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");
|
||||
});
|
||||
}}
|
||||
|
|
Reference in New Issue