Merge pull request #22647 from nextcloud/fix/noid/depcreated-methods-settings

fix use of removed escapeHTML in settings.js
This commit is contained in:
Roeland Jago Douma 2020-09-08 10:35:24 +02:00 committed by GitHub
commit b4729ce142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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('&')
.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