Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
03e19cc8
Commit
03e19cc8
authored
Sep 06, 2020
by
Kev
Committed by
Kushal Pandya
Sep 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace v-html with v-safe-html in groups_dropdown_filter.vue
parent
bba75738
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
ee/app/assets/javascripts/analytics/shared/components/groups_dropdown_filter.vue
...ts/analytics/shared/components/groups_dropdown_filter.vue
+10
-6
ee/changelogs/unreleased/241875-Replace-v-html.yml
ee/changelogs/unreleased/241875-Replace-v-html.yml
+5
-0
No files found.
ee/app/assets/javascripts/analytics/shared/components/groups_dropdown_filter.vue
View file @
03e19cc8
<
script
>
/* eslint-disable vue/no-v-html */
import
{
escape
,
debounce
}
from
'
lodash
'
;
import
{
debounce
}
from
'
lodash
'
;
import
{
GlIcon
,
GlLoadingIcon
,
...
...
@@ -9,6 +8,7 @@ import {
GlNewDropdownHeader
as
GlDropdownHeader
,
GlNewDropdownItem
as
GlDropdownItem
,
GlSearchBoxByType
,
GlSafeHtmlDirective
as
SafeHtml
,
}
from
'
@gitlab/ui
'
;
import
{
s__
,
__
}
from
'
~/locale
'
;
import
Api
from
'
~/api
'
;
...
...
@@ -26,6 +26,9 @@ export default {
GlDropdownItem
,
GlSearchBoxByType
,
},
directives
:
{
SafeHtml
,
},
props
:
{
label
:
{
type
:
String
,
...
...
@@ -105,9 +108,7 @@ export default {
const
parts
=
fullName
.
split
(
'
/
'
);
const
lastPart
=
parts
.
length
-
1
;
return
parts
.
map
((
part
,
idx
)
=>
idx
===
lastPart
?
`<strong>
${
escape
(
part
.
trim
())}
</strong>`
:
escape
(
part
.
trim
()),
)
.
map
((
part
,
idx
)
=>
(
idx
===
lastPart
?
`<strong>
${
part
.
trim
()}
</strong>`
:
part
.
trim
()))
.
join
(
'
/
'
);
},
},
...
...
@@ -151,7 +152,10 @@ export default {
:src=
"group.avatar_url"
shape=
"rect"
/>
<div
class=
"js-group-path align-middle"
v-html=
"formatGroupPath(group.full_name)"
></div>
<div
v-safe-html=
"formatGroupPath(group.full_name)"
class=
"js-group-path align-middle"
></div>
</div>
</gl-dropdown-item>
<gl-dropdown-item
v-show=
"noResultsAvailable"
class=
"gl-pointer-events-none text-secondary"
>
{{
...
...
ee/changelogs/unreleased/241875-Replace-v-html.yml
0 → 100644
View file @
03e19cc8
---
title
:
Replace v-html with v-safe-html in groups_dropdown_filter.vue
merge_request
:
41212
author
:
Kev @KevSlashNull
type
:
other
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment