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
iv
gitlab-ce
Commits
e87ed418
Commit
e87ed418
authored
Jun 29, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render label name contains ?, & in the labels dropdown without escaping
parent
5d11cf2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+2
-2
app/views/shared/_labels_row.html.haml
app/views/shared/_labels_row.html.haml
+3
-4
No files found.
app/assets/javascripts/labels_select.js.coffee
View file @
e87ed418
...
@@ -261,7 +261,7 @@ class @LabelsSelect
...
@@ -261,7 +261,7 @@ class @LabelsSelect
$a
.
attr
(
'data-label-id'
,
label
.
id
)
$a
.
attr
(
'data-label-id'
,
label
.
id
)
$a
.
addClass
(
selectedClass
.
join
(
' '
))
$a
.
addClass
(
selectedClass
.
join
(
' '
))
.
html
(
"
#{
colorEl
}
#{
_
.
escape
(
label
.
title
)
}
"
)
.
html
(
"
#{
colorEl
}
#{
label
.
title
}
"
)
# Return generated html
# Return generated html
$li
.
html
(
$a
).
prop
(
'outerHTML'
)
$li
.
html
(
$a
).
prop
(
'outerHTML'
)
...
@@ -288,7 +288,7 @@ class @LabelsSelect
...
@@ -288,7 +288,7 @@ class @LabelsSelect
fieldName
:
$dropdown
.
data
(
'field-name'
)
fieldName
:
$dropdown
.
data
(
'field-name'
)
id
:
(
label
)
->
id
:
(
label
)
->
if
$dropdown
.
hasClass
(
"js-filter-submit"
)
and
not
label
.
isAny
?
if
$dropdown
.
hasClass
(
"js-filter-submit"
)
and
not
label
.
isAny
?
_
.
escape
label
.
title
label
.
title
else
else
label
.
id
label
.
id
...
...
app/views/shared/_labels_row.html.haml
View file @
e87ed418
-
labels
.
each
do
|
label
|
-
labels
.
each
do
|
label
|
%span
.label-row.btn-group
{
role:
"group"
,
aria:
{
label:
escape_once
(
label
.
name
)
},
style:
"color: #{text_color_for_bg(label.color)}"
}
%span
.label-row.btn-group
{
role:
"group"
,
aria:
{
label:
label
.
name
},
style:
"color: #{text_color_for_bg(label.color)}"
}
=
link_to
label_filter_path
(
@project
,
label
,
type:
controller
.
controller_name
),
=
link_to
label
.
name
,
label
_filter_path
(
@project
,
label
,
type:
controller
.
controller_name
),
class:
"btn btn-transparent has-tooltip"
,
class:
"btn btn-transparent has-tooltip"
,
style:
"background-color:
#{
label
.
color
}
;"
,
style:
"background-color:
#{
label
.
color
}
;"
,
title:
escape_once
(
label
.
description
),
title:
escape_once
(
label
.
description
),
data:
{
container:
"body"
}
do
data:
{
container:
"body"
}
=
escape_once
label
.
name
%button
.btn.btn-transparent.label-remove.js-label-filter-remove
{
type:
"button"
,
style:
"background-color: #{label.color};"
,
data:
{
label:
label
.
title
}
}
%button
.btn.btn-transparent.label-remove.js-label-filter-remove
{
type:
"button"
,
style:
"background-color: #{label.color};"
,
data:
{
label:
label
.
title
}
}
=
icon
(
"times"
)
=
icon
(
"times"
)
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