- journal module registers the Journal pages at journal.routes paths - typed anonymous-GET client, html gate, SSR x-forwarded-for forwarding - fixture API, built-server SSR smoke and git-tag install check
14 lines
624 B
Vue
14 lines
624 B
Vue
<script setup lang="ts">
|
|
// The post body. v-html only ever receives HTML that passed the Journal gate;
|
|
// a blocked or unsafe body renders a neutral notice instead.
|
|
import { gateJournalHtml } from '../../utils/htmlGate.ts'
|
|
|
|
const props = defineProps<{ html: string | null | undefined; blocked?: boolean }>()
|
|
const gated = computed(() => (props.blocked ? { safe: false, html: '' } : gateJournalHtml(props.html)))
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="gated.safe" class="journal-post-body" v-html="gated.html" />
|
|
<p v-else class="journal-post-body journal-post-body--blocked">This content cannot be displayed.</p>
|
|
</template>
|