mirror of
https://github.com/open-webui/open-webui
synced 2024-11-17 05:53:11 +00:00
sandbox in iframe
This commit is contained in:
parent
f3210ec7db
commit
63ee69a900
@ -148,13 +148,18 @@
|
|||||||
<div class=" text-sm font-medium dark:text-gray-300 mt-2">
|
<div class=" text-sm font-medium dark:text-gray-300 mt-2">
|
||||||
{$i18n.t('Content')}
|
{$i18n.t('Content')}
|
||||||
</div>
|
</div>
|
||||||
<pre class="text-sm dark:text-gray-400 whitespace-pre-line">
|
{#if document.metadata?.html}
|
||||||
{#if document.metadata?.html}
|
<iframe
|
||||||
{@html document.document}
|
class="w-full border-0 h-auto rounded-none"
|
||||||
{:else}
|
sandbox="allow-scripts allow-forms allow-same-origin"
|
||||||
{document.document}
|
srcdoc={document.document}
|
||||||
{/if}
|
title={$i18n.t('Content')}
|
||||||
</pre>
|
></iframe>
|
||||||
|
{:else}
|
||||||
|
<pre class="text-sm dark:text-gray-400 whitespace-pre-line">
|
||||||
|
{document.document}
|
||||||
|
</pre>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if documentIdx !== mergedDocuments.length - 1}
|
{#if documentIdx !== mergedDocuments.length - 1}
|
||||||
|
Loading…
Reference in New Issue
Block a user