This commit is contained in:
Timothy Jaeryang Baek 2024-11-12 14:00:32 -08:00
parent 330a3535e6
commit b1d31d9b8e

View File

@ -1,4 +1,6 @@
<script lang="ts"> <script lang="ts">
import DOMPurify from 'dompurify';
import { getContext, onMount, tick } from 'svelte'; import { getContext, onMount, tick } from 'svelte';
import Modal from '$lib/components/common/Modal.svelte'; import Modal from '$lib/components/common/Modal.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte';
@ -150,7 +152,7 @@
</div> </div>
<pre class="text-sm dark:text-gray-400 whitespace-pre-line"> <pre class="text-sm dark:text-gray-400 whitespace-pre-line">
{#if document.metadata?.html} {#if document.metadata?.html}
{@html document.document} {@html DOMPurify(document.document)}
{:else} {:else}
{document.document} {document.document}
{/if} {/if}