Skip to content

Commit e2697b0

Browse files
authored
tests: fix sanitizer test. (#32045)
The test template does not include a `script` tag so the test always returned true.
1 parent 71010cb commit e2697b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/tests/unit/util/sanitizer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('Sanitizer', () => {
2020

2121
const result = sanitizeHtml(template, DefaultAllowlist, null)
2222

23-
expect(result).not.toContain('script')
23+
expect(result).not.toContain('href="javascript:alert(7)')
2424
})
2525

2626
it('should allow aria attributes and safe attributes', () => {

0 commit comments

Comments
 (0)