Render label name contains ?, & in the labels dropdown without escaping
This commit is contained in:
parent
5d11cf2e98
commit
e87ed41876
2 changed files with 5 additions and 6 deletions
|
@ -261,7 +261,7 @@ class @LabelsSelect
|
|||
$a.attr('data-label-id', label.id)
|
||||
|
||||
$a.addClass(selectedClass.join(' '))
|
||||
.html("#{colorEl} #{_.escape(label.title)}")
|
||||
.html("#{colorEl} #{label.title}")
|
||||
|
||||
# Return generated html
|
||||
$li.html($a).prop('outerHTML')
|
||||
|
@ -288,7 +288,7 @@ class @LabelsSelect
|
|||
fieldName: $dropdown.data('field-name')
|
||||
id: (label) ->
|
||||
if $dropdown.hasClass("js-filter-submit") and not label.isAny?
|
||||
_.escape label.title
|
||||
label.title
|
||||
else
|
||||
label.id
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
- 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)}" }
|
||||
= link_to label_filter_path(@project, label, type: controller.controller_name),
|
||||
%span.label-row.btn-group{ role: "group", aria: { label: label.name }, style: "color: #{text_color_for_bg(label.color)}" }
|
||||
= link_to label.name, label_filter_path(@project, label, type: controller.controller_name),
|
||||
class: "btn btn-transparent has-tooltip",
|
||||
style: "background-color: #{label.color};",
|
||||
title: escape_once(label.description),
|
||||
data: { container: "body" } do
|
||||
= escape_once label.name
|
||||
data: { container: "body" }
|
||||
%button.btn.btn-transparent.label-remove.js-label-filter-remove{ type: "button", style: "background-color: #{label.color};", data: { label: label.title } }
|
||||
= icon("times")
|
||||
|
|
Loading…
Reference in a new issue