FIX: For now, not purifying.
Not sure if there is a need for this, since all the content is generated server side and there isn't really anything that could be damaged by an XSS attack. But I will do some looking.
This commit is contained in:
parent
aeda7fd64f
commit
793e656efa
@ -1,25 +1,8 @@
|
||||
<script lang="ts">
|
||||
import type { PageProps } from './$types';
|
||||
// import hljs from 'highlight.js';
|
||||
|
||||
let { data }: PageProps = $props();
|
||||
// Run highlight.js after the component is rendered (onMount or after each update)
|
||||
// import { onMount } from 'svelte';
|
||||
//
|
||||
// onMount(() => {
|
||||
// // console.log("onMount called");
|
||||
// highlightAllCodeBlocks();
|
||||
// });
|
||||
//
|
||||
// function highlightAllCodeBlocks() {
|
||||
// // console.log("highlightAllCodeBlocks called");
|
||||
// const codeBlocks = document.querySelectorAll('pre code');
|
||||
// codeBlocks.forEach((block) => {
|
||||
// hljs.highlightElement(block);
|
||||
// });
|
||||
// }
|
||||
</script>
|
||||
|
||||
<div class="prose">
|
||||
<div class="blog-wrapper prose">
|
||||
{@html data.post.content}
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user