Pattern: Use of v-html
directive
Issue: -
This rule reports all uses of v-html
directive in order to reduce the risk of injecting potentially unsafe/unescaped HTML into the browser leading to Cross-Site Scripting (XSS) attacks.
<template>
<!-- ✓ GOOD -->
<div>{{ someHTML }}</div>
<!-- ✗ BAD -->
<div v-html="someHTML"></div>
</template>
If you are certain the content passed to v-html
is sanitized HTML you can disable this rule.