2022-08-27 10:44:58 -08:00
|
|
|
<template>
|
2023-10-07 14:23:47 -05:00
|
|
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
2025-06-20 00:09:12 +07:00
|
|
|
<div v-html="safeMarkup" />
|
2022-08-27 10:44:58 -08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-10-07 14:23:47 -05:00
|
|
|
import { sanitizeIngredientHTML } from "~/composables/recipes/use-recipe-ingredients";
|
2025-06-20 00:09:12 +07:00
|
|
|
|
|
|
|
export default defineNuxtComponent({
|
2022-08-27 10:44:58 -08:00
|
|
|
props: {
|
|
|
|
markup: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
2023-10-07 14:23:47 -05:00
|
|
|
setup(props) {
|
|
|
|
const safeMarkup = computed(() => sanitizeIngredientHTML(props.markup));
|
|
|
|
return {
|
|
|
|
safeMarkup,
|
2025-06-20 00:09:12 +07:00
|
|
|
};
|
|
|
|
},
|
2022-08-27 10:44:58 -08:00
|
|
|
});
|
|
|
|
</script>
|