Skip to content

Commit

Permalink
feat: escape paste data
Browse files Browse the repository at this point in the history
  • Loading branch information
httpjamesm committed Dec 13, 2023
1 parent f262fb0 commit a09d9ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/v/PasteViewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
export let expiresAt: string;
export let oneView: boolean;
import { Marked } from '@ts-stack/markdown';
import { Marked, escape } from '@ts-stack/markdown';
import { onMount } from 'svelte';
let enableFormatting = true;
Expand All @@ -20,7 +20,7 @@
onMount(() => {
const marked = Marked.setOptions({});
html = marked.parse(body);
html = marked.parse(escape(body));
});
const iframeCSP = "default-src 'self'; style-src 'unsafe-inline';";
Expand Down

0 comments on commit a09d9ab

Please sign in to comment.