diff --git a/packages/presentation/src/components/MessageViewer.svelte b/packages/presentation/src/components/MessageViewer.svelte index d40006f78a..422f280395 100644 --- a/packages/presentation/src/components/MessageViewer.svelte +++ b/packages/presentation/src/components/MessageViewer.svelte @@ -23,7 +23,7 @@ const parser = new DOMParser() - $: dom = parser.parseFromString(message, 'application/xhtml+xml').firstChild as HTMLElement + $: dom = parser.parseFromString(message, 'text/html').firstChild?.childNodes[1] as HTMLElement diff --git a/packages/presentation/src/components/message/Nodes.svelte b/packages/presentation/src/components/message/Nodes.svelte index 84a4c84cac..f77edd07d1 100644 --- a/packages/presentation/src/components/message/Nodes.svelte +++ b/packages/presentation/src/components/message/Nodes.svelte @@ -25,11 +25,19 @@ {#if node.nodeType === Node.TEXT_NODE} {node.data} {:else} - {#if node.nodeName === 'em'} + {#if node.nodeName === 'EM'} - {:else if node.nodeName === 'strong'} + {:else if node.nodeName === 'STRONG'} - {:else if node.nodeName === 'span'} + {:else if node.nodeName === 'P'} +

+ {:else if node.nodeName === 'BLOCKQUOTE'} +
+ {:else if node.nodeName === 'CODE'} + + {:else if node.nodeName === 'BR'} +
+ {:else if node.nodeName === 'SPAN'} {:else} Unknown { node.nodeName }