fixes use of removed escapeHTML in settings.js

- solves non-working "additional settings" sections (at least)

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2020-09-07 22:57:45 +02:00
parent 47e7257c80
commit 43ea48c079
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 11 additions and 2 deletions

View File

@ -8,6 +8,15 @@ OC.Settings = _.extend(OC.Settings, {
_cachedGroups: null,
escapeHTML: function (text) {
return text.toString()
.split('&').join('&amp;')
.split('<').join('&lt;')
.split('>').join('&gt;')
.split('"').join('&quot;')
.split('\'').join('&#039;');
},
/**
* Setup selection box for group selection.
*
@ -75,10 +84,10 @@ OC.Settings = _.extend(OC.Settings, {
callback(selection);
},
formatResult: function(element) {
return escapeHTML(element.displayname);
return self.escapeHTML(element.displayname);
},
formatSelection: function(element) {
return escapeHTML(element.displayname);
return self.escapeHTML(element.displayname);
},
escapeMarkup: function(m) {
// prevent double markup escape