fix(api,frontend): isolate active share files and allowlist link schemes
This commit is contained in:
1 parent
0399145791
commit
c832513e5c
10 files changed
+75
-16
No files matched your search
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import type { InlineButton } from "$lib/api/types";
|
||||
import { safeHref } from "$lib/format/url";
|
||||
|
||||
interface Props {
|
||||
rows: InlineButton[][];
|
||||
@@ -26,7 +27,12 @@
|
||||
{#each row as button, colIndex (colIndex)}
|
||||
{@const key = `${rowIndex}:${colIndex}`}
|
||||
{#if button.kind === "url" && button.url}
|
||||
<a class="button" href={button.url} target="_blank" rel="noopener">
|
||||
<a
|
||||
class="button"
|
||||
href={safeHref(button.url)}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<span class="label">{button.text}</span>
|
||||
<span class="corner">↗</span>
|
||||
</a>
|
||||
|
||||
Reference in new issue
Block a user