mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-14 18:42:30 +03:00
tests: fix sanitizer test. (#32045)
The test template does not include a `script` tag so the test always returned true.
This commit is contained in:
@@ -20,7 +20,7 @@ describe('Sanitizer', () => {
|
|||||||
|
|
||||||
const result = sanitizeHtml(template, DefaultAllowlist, null)
|
const result = sanitizeHtml(template, DefaultAllowlist, null)
|
||||||
|
|
||||||
expect(result).not.toContain('script')
|
expect(result).not.toContain('href="javascript:alert(7)')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should allow aria attributes and safe attributes', () => {
|
it('should allow aria attributes and safe attributes', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user