]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add local version of escapeHTML 23548/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Wed, 7 Oct 2020 20:58:00 +0000 (22:58 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Sun, 18 Oct 2020 15:28:17 +0000 (15:28 +0000)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
apps/files_external/js/settings.js

index 2470cb4c60ab87525fe46c66ea5d5c030ca6d0f7..bd3bd0f58456bf05fdb6b84a3b47890cbc1513d9 100644 (file)
@@ -57,6 +57,14 @@ function highlightInput($input) {
  * @param {int} userListLimit page size for result list
  */
 function addSelect2 ($elements, userListLimit) {
+       var escapeHTML = function (text) {
+               return text.toString()
+                       .split('&').join('&amp;')
+                       .split('<').join('&lt;')
+                       .split('>').join('&gt;')
+                       .split('"').join('&quot;')
+                       .split('\'').join('&#039;');
+       };
        if (!$elements.length) {
                return;
        }