소스 검색

fix: pseudo html rendering issue

Timothy J. Baek 8 달 전
부모
커밋
9025e9dbb1
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/lib/components/chat/Messages/MarkdownInlineTokens.svelte
  2. 1 1
      src/lib/components/chat/Messages/MarkdownTokens.svelte

+ 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}