Skip to content

Commit

Permalink
escape html
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Oct 16, 2023
1 parent 7cef628 commit c71c5c4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions js/files/circles.files.list.js
Expand Up @@ -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('&amp;')
.split('<').join('&lt;')
.split('>').join('&gt;')
.split('"').join('&quot;')
.split('\'').join('&#039;');
},

sortResults: function(results) {
Expand Down

0 comments on commit c71c5c4

Please sign in to comment.