diff --git a/rhodecode/public/js/src/rhodecode.js b/rhodecode/public/js/src/rhodecode.js --- a/rhodecode/public/js/src/rhodecode.js +++ b/rhodecode/public/js/src/rhodecode.js @@ -241,7 +241,7 @@ var formatSelect2SelectionRefs = functio } else if (commit_ref.type === 'book'){ tmpl = tmpl.concat(' '); } - return tmpl.concat(commit_ref.text); + return tmpl.concat(escapeHtml(commit_ref.text)); }; // takes a given html element and scrolls it down offset pixels diff --git a/rhodecode/public/js/src/rhodecode/select2_widgets.js b/rhodecode/public/js/src/rhodecode/select2_widgets.js --- a/rhodecode/public/js/src/rhodecode/select2_widgets.js +++ b/rhodecode/public/js/src/rhodecode/select2_widgets.js @@ -35,7 +35,6 @@ var select2RefBaseSwitcher = function(ta $(targetElement).select2({ cachedDataSource: {}, dropdownAutoWidth: true, - formatResult: formatResult, width: "resolve", containerCssClass: "drop-menu", dropdownCssClass: "drop-menu-dropdown", @@ -59,11 +58,10 @@ var select2RefBaseSwitcher = function(ta }); } }, - initSelection: function(element, callback) { callback(initialData); }, - + formatResult: formatResult, formatSelection: formatSelection });