| 
									
										
										
										
											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 --> | 
					
						
							|  |  |  |   <div v-html="safeMarkup"></div> | 
					
						
							| 
									
										
										
										
											2022-08-27 10:44:58 -08:00
										 |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2023-10-07 14:23:47 -05:00
										 |  |  | import { computed, defineComponent } from "@nuxtjs/composition-api"; | 
					
						
							|  |  |  | import { sanitizeIngredientHTML } from "~/composables/recipes/use-recipe-ingredients"; | 
					
						
							| 
									
										
										
										
											2022-08-27 10:44:58 -08:00
										 |  |  | export default defineComponent({ | 
					
						
							|  |  |  |   props: { | 
					
						
							|  |  |  |     markup: { | 
					
						
							|  |  |  |       type: String, | 
					
						
							|  |  |  |       required: true, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2023-10-07 14:23:47 -05:00
										 |  |  |   setup(props) { | 
					
						
							|  |  |  |     const safeMarkup = computed(() => sanitizeIngredientHTML(props.markup)); | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |       safeMarkup, | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2022-08-27 10:44:58 -08:00
										 |  |  | }); | 
					
						
							|  |  |  | </script> |