Ver código fonte

fix: pseudo html rendering issue

Timothy J. Baek 8 meses atrás
pai
commit
9025e9dbb1

+ 1 - 1
src/lib/components/chat/Messages/MarkdownInlineTokens.svelte

@@ -16,7 +16,7 @@
 		{unescapeHtml(token.text)}
 	{:else if token.type === 'html'}
 		{@const html = DOMPurify.sanitize(token.text)}
-		{#if html}
+		{#if html && html.includes('<video')}
 			{@html html}
 		{:else}
 			{token.text}

+ 1 - 1
src/lib/components/chat/Messages/MarkdownTokens.svelte

@@ -94,7 +94,7 @@
 		{/if}
 	{:else if token.type === 'html'}
 		{@const html = DOMPurify.sanitize(token.text)}
-		{#if html}
+		{#if html && html.includes('<video')}
 			{@html html}
 		{:else}
 			{token.text}