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

Add local version of escapeHTML
This commit is contained in:
Roeland Jago Douma 2020-10-09 09:25:05 +02:00 committed by GitHub
commit 2ec160aec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View 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('&')
.split('<').join('&lt;')
.split('>').join('&gt;')
.split('"').join('&quot;')
.split('\'').join('&#039;');
};
if (!$elements.length) {
return;
}