Fix escape in member select2

pull/6141/head
Oliver Günther 7 years ago
parent baa7e99d1d
commit 5dadaca42f
  1. 10
      app/assets/javascripts/members_select_boxes.js

@ -36,22 +36,22 @@ jQuery(document).ready(function($) {
if (match < 0) {
return "<span data-value='" + item.id + "'>" +
OpenProject.Helpers.markupEscape(item.name) + "</span>";
_.escape(item.name) + "</span>";
}
markup.push(OpenProject.Helpers.markupEscape(
markup.push(_.escape(
item.name.substring(0, match)));
markup.push("<span class='select2-match' data-value='" + item.id + "'>");
markup.push(OpenProject.Helpers.markupEscape(
markup.push(_.escape(
item.name.substring(match, match + tl)));
markup.push("</span>");
markup.push(OpenProject.Helpers.markupEscape(
markup.push(_.escape(
item.name.substring(match + tl, item.name.length)));
return markup.join("");
};
formatItemSelection = function (item) {
return OpenProject.Helpers.markupEscape(item.name);
return _.escape(item.name);
};
$("#members_add_form select.select2-select").each(function (ix, elem){

Loading…
Cancel
Save