mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-18 20:59:41 +02:00
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
23 lines
478 B
Vue
23 lines
478 B
Vue
<template>
|
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
|
<div v-html="safeMarkup" />
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { sanitizeIngredientHTML } from "~/composables/recipes/use-recipe-ingredients";
|
|
|
|
export default defineNuxtComponent({
|
|
props: {
|
|
markup: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
setup(props) {
|
|
const safeMarkup = computed(() => sanitizeIngredientHTML(props.markup));
|
|
return {
|
|
safeMarkup,
|
|
};
|
|
},
|
|
});
|
|
</script>
|