Merge pull request #23548 from nextcloud/backport/23264/stable20
[stable20] Add local version of escapeHTML
This commit is contained in:
commit
52f873942c
|
@ -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('<')
|
||||||
|
.split('>').join('>')
|
||||||
|
.split('"').join('"')
|
||||||
|
.split('\'').join(''');
|
||||||
|
};
|
||||||
if (!$elements.length) {
|
if (!$elements.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue