1
0
Fork 0
mirror of https://github.com/elk-zone/elk.git synced 2025-05-06 23:35:08 +03:00

fix: prevent HTML injections to code blocks ()

This commit is contained in:
jviide 2023-01-15 12:48:22 +02:00 committed by GitHub
parent 1a4fd19720
commit c15df78cbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 88 additions and 25 deletions
components/content

View file

@ -18,5 +18,6 @@ const highlighted = computed(() => {
</script>
<template>
<pre class="code-block" v-html="highlighted" />
<pre v-if="lang" class="code-block" v-html="highlighted" />
<pre v-else class="code-block">{{ raw }}</pre>
</template>