Add local version of escapeHTML
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
97eb117251
commit
732f65b5fd
|
@ -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