forked from tanner/qotnews
move purify to server side.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script>
|
||||
import StoryInfo from "../components/StoryInfo.svelte";
|
||||
import Html from "../components/Html.svelte";
|
||||
|
||||
export let story;
|
||||
|
||||
@@ -62,7 +61,7 @@
|
||||
<article class="article">
|
||||
<header class="article-header">
|
||||
<h1 class="article-title">
|
||||
<Html html={story.title} text={story.title} />
|
||||
{@html story.title}
|
||||
</h1>
|
||||
{#if story.url}
|
||||
<div>source: <a class="article-source" href={story.url}>{host}</a></div>
|
||||
@@ -73,6 +72,6 @@
|
||||
</header>
|
||||
|
||||
<section class="article-body">
|
||||
<Html html={story.text} />
|
||||
{@html story.text}
|
||||
</section>
|
||||
</article>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script>
|
||||
import Time from "../components/Time.svelte";
|
||||
import Html from "../components/Html.svelte";
|
||||
|
||||
export let story;
|
||||
export let comment;
|
||||
@@ -86,7 +85,7 @@
|
||||
</header>
|
||||
|
||||
<section class={showComments ? 'comment-text' : 'comment-text is-collapsed'}>
|
||||
<Html html={comment.text} />
|
||||
{@html comment.text}
|
||||
</section>
|
||||
|
||||
{#if !showComments}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script>
|
||||
import { getLogoUrl } from "../utils/logos.js";
|
||||
import StoryInfo from "../components/StoryInfo.svelte";
|
||||
import Html from "../components/Html.svelte";
|
||||
export let stories;
|
||||
|
||||
const host = (url) => new URL(url).hostname.replace(/^www\./, "");
|
||||
@@ -43,7 +42,7 @@
|
||||
class="story-icon"
|
||||
style="height: 1rem; width: 1rem;" />
|
||||
<a class="story-title" rel="prefetch" href="/{story.id}">
|
||||
<Html html={story.title} text={story.title} />
|
||||
{@html story.title}
|
||||
</a>
|
||||
<a
|
||||
class="story-source"
|
||||
|
||||
Reference in New Issue
Block a user