mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-02 10:13:35 -05:00 
			
		
		
		
	* 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>
 |