Commit 7f3cc642 authored by Byron Jones's avatar Byron Jones

Bug 1163393: XSS in the new jQuery autocomplete code

r=dkl,a=glob
parent bd41649c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment