diff --git a/frontend/src/lib/components/DisplayResult.svelte b/frontend/src/lib/components/DisplayResult.svelte index 7b6ca3f2fe..4c1850db13 100644 --- a/frontend/src/lib/components/DisplayResult.svelte +++ b/frontend/src/lib/components/DisplayResult.svelte @@ -20,6 +20,7 @@ | 'gif' | 'error' | 'approval' + | 'svg' | undefined $: resultKind = inferResultKind(result) @@ -61,6 +62,8 @@ return 'html' } else if (keys.length == 1 && keys[0] == 'png') { return 'png' + } else if (keys.length == 1 && keys[0] == 'svg') { + return 'svg' } else if (keys.length == 1 && keys[0] == 'jpeg') { return 'jpeg' } else if (keys.length == 1 && keys[0] == 'file') { @@ -137,16 +140,16 @@

Rendering HTML can expose you to XSS attacks. -Only enable it if you trust the author of the script. + >Rendering HTML can expose you to XSS attacks. Only enable it if you trust the author of the script.

-
@@ -165,6 +168,11 @@ Only enable it if you trust the author of the script. src="data:image/jpeg;base64,{result.jpeg}" /> + {:else if !forceJson && resultKind == 'svg'} +
Download +
+
{@html result.svg}
{:else if !forceJson && resultKind == 'gif'}
gif rendered