Even better with a test

Refs 4fca2cccca
This commit is contained in:
David Larlet 2023-06-14 12:59:44 -04:00
parent 4fca2cccca
commit 8400d9f03a
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD

View file

@ -166,6 +166,13 @@ describe('L.Util', function () {
assert.equal(L.Util.escapeHTML('<span onload="alert(oups)">'), '<span></span>')
})
it('should not escape geo: links', function () {
assert.equal(
L.Util.escapeHTML('<a href="geo:1,2"></a>'),
'<a href="geo:1,2"></a>'
)
})
it('should not fail with int value', function () {
assert.equal(L.Util.escapeHTML(25), '25')
})