Skip to content
Snippets Groups Projects
Unverified Commit 2ec160ae authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #23264 from nextcloud/bug/23177/escape-html

Add local version of escapeHTML
parents 049d5b3a d0f18f4d
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,14 @@ function highlightInput($input) { ...@@ -57,6 +57,14 @@ function highlightInput($input) {
* @param {int} userListLimit page size for result list * @param {int} userListLimit page size for result list
*/ */
function addSelect2 ($elements, userListLimit) { function addSelect2 ($elements, userListLimit) {
var escapeHTML = function (text) {
return text.toString()
.split('&').join('&')
.split('<').join('&lt;')
.split('>').join('&gt;')
.split('"').join('&quot;')
.split('\'').join('&#039;');
};
if (!$elements.length) { if (!$elements.length) {
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment