From 888c341296d75f8609abeb73a2ca305ece8cf2f1 Mon Sep 17 00:00:00 2001 From: Jason Schwarzenberger Date: Wed, 2 Dec 2020 14:10:13 +1300 Subject: [PATCH] more. --- webapp/src/components/Article.svelte | 6 +++++- webapp/src/components/StoryList.svelte | 12 +++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/Article.svelte b/webapp/src/components/Article.svelte index 56d872a..1d52659 100644 --- a/webapp/src/components/Article.svelte +++ b/webapp/src/components/Article.svelte @@ -7,9 +7,11 @@ let host = new URL(story.url || story.link).hostname.replace(/^www\./, ""); let html; + let title; onMount(() => { html = DOMPurify.sanitize(story.text); + title = DOMPurify.sanitize(story.title); }); @@ -67,7 +69,9 @@
-

{story.title}

+

+ {@html title} +

{#if story.url}
source: {host}
{/if} diff --git a/webapp/src/components/StoryList.svelte b/webapp/src/components/StoryList.svelte index 09b1fad..593448c 100644 --- a/webapp/src/components/StoryList.svelte +++ b/webapp/src/components/StoryList.svelte @@ -1,9 +1,16 @@