fix: prevent HTML injections to code blocks (#1165)

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

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>