summaryrefslogtreecommitdiffstats
path: root/public/javascripts/application.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts/application.js')
-rw-r--r--public/javascripts/application.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index c1b1c7c71..e2cd3d1b7 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -8,6 +8,12 @@ $.ajaxPrefilter(function (s) {
}
});
+function sanitizeHTML(string) {
+ var temp = document.createElement('span');
+ temp.textContent = string;
+ return temp.innerHTML;
+}
+
function checkAll(id, checked) {
$('#'+id).find('input[type=checkbox]:enabled').prop('checked', checked);
}
@@ -1062,6 +1068,9 @@ function inlineAutoComplete(element) {
requireLeadingSpace: true,
selectTemplate: function (issue) {
return '#' + issue.original.id;
+ },
+ menuItemTemplate: function (issue) {
+ return sanitizeHTML(issue.original.label);
}
});