Add local version of escapeHTML

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2020-10-07 22:58:00 +02:00 committed by backportbot[bot]
parent 97eb117251
commit 732f65b5fd
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('&amp;')
.split('<').join('&lt;')
.split('>').join('&gt;')
.split('"').join('&quot;')
.split('\'').join('&#039;');
};
if (!$elements.length) {
return;
}