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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
20d3c6eb
Commit
20d3c6eb
authored
Oct 23, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes escape from job item
Tooltips aren't using v-html anymore thus causing escape not to be needed
parent
1ad3ce92
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
app/assets/javascripts/jobs/components/job_container_item.vue
...assets/javascripts/jobs/components/job_container_item.vue
+5
-6
changelogs/unreleased/53013-duplicate-escape.yml
changelogs/unreleased/53013-duplicate-escape.yml
+5
-0
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+2
-3
No files found.
app/assets/javascripts/jobs/components/job_container_item.vue
View file @
20d3c6eb
<
script
>
<
script
>
import
_
from
'
underscore
'
;
import
CiIcon
from
'
~/vue_shared/components/ci_icon.vue
'
;
import
CiIcon
from
'
~/vue_shared/components/ci_icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
...
@@ -9,11 +8,9 @@ export default {
...
@@ -9,11 +8,9 @@ export default {
CiIcon
,
CiIcon
,
Icon
,
Icon
,
},
},
directives
:
{
directives
:
{
tooltip
,
tooltip
,
},
},
props
:
{
props
:
{
job
:
{
job
:
{
type
:
Object
,
type
:
Object
,
...
@@ -24,10 +21,9 @@ export default {
...
@@ -24,10 +21,9 @@ export default {
required
:
true
,
required
:
true
,
},
},
},
},
computed
:
{
computed
:
{
tooltipText
()
{
tooltipText
()
{
return
`
${
_
.
escape
(
this
.
job
.
name
)
}
-
${
this
.
job
.
status
.
tooltip
}
`
;
return
`
${
this
.
job
.
name
}
-
${
this
.
job
.
status
.
tooltip
}
`
;
},
},
},
},
};
};
...
@@ -36,7 +32,10 @@ export default {
...
@@ -36,7 +32,10 @@ export default {
<
template
>
<
template
>
<div
<div
class=
"build-job"
class=
"build-job"
:class=
"
{ retried: job.retried, active: isActive }"
:class=
"
{
retried: job.retried,
active: isActive
}"
>
>
<a
<a
v-tooltip
v-tooltip
...
...
changelogs/unreleased/53013-duplicate-escape.yml
0 → 100644
View file @
20d3c6eb
---
title
:
Remove duplicate escape in job sidebar
merge_request
:
author
:
type
:
fixed
spec/features/projects/jobs_spec.rb
View file @
20d3c6eb
...
@@ -151,9 +151,8 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
...
@@ -151,9 +151,8 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
end
end
it
'renders escaped tooltip name'
do
it
'renders escaped tooltip name'
do
page
.
within
(
'aside.right-sidebar'
)
do
page
.
find
(
'.active.build-job a'
).
hover
expect
(
find
(
'.active.build-job a'
)[
'data-original-title'
]).
to
eq
(
'<img src=x onerror=alert(document.domain)> - passed'
)
expect
(
page
).
to
have_content
(
'<img src=x onerror=alert(document.domain)> - passed'
)
end
end
end
end
end
...
...
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