summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/field.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/field.js b/js/field.js
index f55852671..5a48db471 100644
--- a/js/field.js
+++ b/js/field.js
@@ -844,8 +844,12 @@ $(function() {
};
},
formatResult: function(suggestion, currentValue) {
- return suggestion.data.name === '' ?
- suggestion.data.login : suggestion.data.name + ' (' + suggestion.data.login + ')';
+ return (suggestion.data.name === '' ?
+ suggestion.data.login : suggestion.data.name + ' (' + suggestion.data.login + ')')
+ .replace(/&/g, '&')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/"/g, '&quot;');
},
onSearchStart: function(params) {
var that = $(this);