diff --git a/js/files/circles.files.list.js b/js/files/circles.files.list.js index 6733bd155..a9e4e5b2a 100644 --- a/js/files/circles.files.list.js +++ b/js/files/circles.files.list.js @@ -124,11 +124,20 @@ }, formatResult: function(circle) { - return circle.name; + return this.escapeHTML(circle.name); }, formatSelection: function(circle) { - return circle.name; + return this.escapeHTML(circle.name); + }, + + escapeHTML: function (text) { + return text.toString() + .split('&').join('&') + .split('<').join('<') + .split('>').join('>') + .split('"').join('"') + .split('\'').join('''); }, sortResults: function(results) {