diff --git a/js/files/circles.files.list.js b/js/files/circles.files.list.js index 2da4417cc..78fac5687 100644 --- a/js/files/circles.files.list.js +++ b/js/files/circles.files.list.js @@ -22,6 +22,17 @@ * along with this program. If not, see . * */ + + +function escapeHTML(text) { + return text.toString() + .split('&').join('&') + .split('<').join('<') + .split('>').join('>') + .split('"').join('"') + .split('\'').join(''') +} + (function() { /** * @class OCA.Circles.FileList @@ -124,12 +135,11 @@ }, formatResult: function (circle) { - return circle.name; + return escapeHTML(circle.name); }, formatSelection: function (circle) { - return circle.name; - //return OC.SystemTags.getDescriptiveTag(tag)[0].outerHTML; + return escapeHTML(circle.name); }, sortResults: function(results) {