Commit 77d52416 authored by Kev's avatar Kev Committed by Kushal Pandya

Replace v-html with v-safe-html in registry_breadcrumb.vue

parent bba75738
<script> <script>
/* eslint-disable vue/no-v-html */
import { initial, first, last } from 'lodash'; import { initial, first, last } from 'lodash';
import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
export default { export default {
directives: { SafeHtml },
props: { props: {
crumbs: { crumbs: {
type: Array, type: Array,
...@@ -42,14 +43,14 @@ export default { ...@@ -42,14 +43,14 @@ export default {
<li <li
v-for="(crumb, index) in rootCrumbs" v-for="(crumb, index) in rootCrumbs"
:key="index" :key="index"
v-safe-html="crumb.innerHTML"
:class="crumb.className" :class="crumb.className"
v-html="crumb.innerHTML"
></li> ></li>
<li v-if="!isRootRoute"> <li v-if="!isRootRoute">
<router-link ref="rootRouteLink" :to="rootRoute.path"> <router-link ref="rootRouteLink" :to="rootRoute.path">
{{ rootRoute.meta.nameGenerator(rootRoute) }} {{ rootRoute.meta.nameGenerator(rootRoute) }}
</router-link> </router-link>
<component :is="divider.tagName" :class="divider.classList" v-html="divider.innerHTML" /> <component :is="divider.tagName" v-safe-html="divider.innerHTML" :class="divider.classList" />
</li> </li>
<li> <li>
<component :is="lastCrumb.tagName" ref="lastCrumb" :class="lastCrumb.className"> <component :is="lastCrumb.tagName" ref="lastCrumb" :class="lastCrumb.className">
......
---
title: Replace v-html with v-safe-html in registry_breadcrumb.vue
merge_request: 41207
author: Kev @KevSlashNull
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment