npm install --save vue-html-secure // or yarn add vue-html-secure Directives and functions v-html-safe="..." or $safeHTML(...) This leaves all HTML tags except for <script> and removes insecure elements's attri
/// JS for Vue 3.x \\\import*asVuefrom'vue';importVueSecureHTMLfrom'vue-html-secure';constApp=Vue.createApp({data(){return{message:"Hello <img src='' onerror=alert('XSS!')> VUE",}},});// OptionalApp.config.globalProperties.$safeHTML=VueSecureHTML.safeHTML;App.config.globalPropertie...