From d0f18f4d9a943b87c88c560490f0640b86675ac1 Mon Sep 17 00:00:00 2001
From: Daniel Kesselberg <mail@danielkesselberg.de>
Date: Wed, 7 Oct 2020 22:58:00 +0200
Subject: [PATCH] Add local version of escapeHTML

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
---
 apps/files_external/js/settings.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 2470cb4c60a..bd3bd0f5845 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -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;
 	}
-- 
GitLab