mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-03 18:53:17 -05:00 
			
		
		
		
	Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
		
			
				
	
	
		
			24 lines
		
	
	
		
			478 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			24 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>
 |