]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixes use of removed escapeHTML in settings.js 22647/head
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 7 Sep 2020 20:57:45 +0000 (22:57 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 7 Sep 2020 20:57:45 +0000 (22:57 +0200)
- solves non-working "additional settings" sections (at least)

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/settings/js/settings.js

index 24384ee316be8a4f21bae758b076bd1c5954fc83..510180d455963485db63d26809a7547dd7b33d7d 100644 (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