mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
Merge pull request #6879 from michaelpoluektov/fix/render-html-in-citations
fix/feat: add HTML rendering to citations back
This commit is contained in:
commit
fb464800e4
1 changed files with 7 additions and 1 deletions
|
|
@ -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';
|
||||||
|
|
@ -149,7 +151,11 @@
|
||||||
{$i18n.t('Content')}
|
{$i18n.t('Content')}
|
||||||
</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}
|
||||||
|
{@html DOMPurify(document.document)}
|
||||||
|
{:else}
|
||||||
{document.document}
|
{document.document}
|
||||||
|
{/if}
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue