Skip to content

Commit

Permalink
tests: fix sanitizer test.
Browse files Browse the repository at this point in the history
The test template does not include a `script` tag so the test always returned true.
  • Loading branch information
XhmikosR committed Nov 2, 2020
1 parent 0eaa34c commit 9988ecc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/tests/unit/util/sanitizer.spec.js
Expand Up @@ -20,7 +20,7 @@ describe('Sanitizer', () => {

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', () => {
Expand Down

0 comments on commit 9988ecc

Please sign in to comment.