I now that in the Vue Documenteation about Raw HTML state that we can use v-html to render some inner html. I admit that this is the legal and most simple trick to do but since I'm quite the worrywart I can't stop thinking if I can use it safely in web project. let say I use this v-html only for render some html tag such as br, span, etc.
but in the documentation they state clearly like this:
Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to XSS vulnerabilities. Only use HTML interpolation on trusted content and never on user-provided content.
if I use v-html only for text rendering in vue component such as this code and without input tag, is it safe for XSS Vulnerabilities attack or Cross-site Scripting:
<template>
<div>
<h2 v-html="header" />
<h2 class="bold" v-html="bHeader" />
<h2 class="italic" v-html="iHeader" />
<h2 class="text-muted" v-html="mHeader" />
</div>
</template>
Can someone help me ? I'm quite confused about this, in fact I only use this v-html only for text tag such as h1, h2, h3, etc.