Commit 965c2b0b authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '241964-Replace-v-html' into 'master'

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

See merge request gitlab-org/gitlab!41207
parents a6369d04 77d52416
<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