mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-01-30 14:52:58 -08:00
bd79c1db2f
* ignore unsafe html warnings * remove unused import * re-order attrs * removed unused vars/imports * removed unused import * refactored v-html * removed more unused things
24 lines
544 B
Vue
24 lines
544 B
Vue
<template>
|
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
|
<div v-html="safeMarkup"></div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { computed, defineComponent } from "@nuxtjs/composition-api";
|
|
import { sanitizeIngredientHTML } from "~/composables/recipes/use-recipe-ingredients";
|
|
export default defineComponent({
|
|
props: {
|
|
markup: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
setup(props) {
|
|
const safeMarkup = computed(() => sanitizeIngredientHTML(props.markup));
|
|
return {
|
|
safeMarkup,
|
|
}
|
|
}
|
|
});
|
|
</script>
|