From e2697b05733e2b8a88d35912d604644862d609b4 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 2 Nov 2020 14:49:56 +0200 Subject: tests: fix sanitizer test. (#32045) The test template does not include a `script` tag so the test always returned true. --- js/tests/unit/util/sanitizer.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/tests/unit/util/sanitizer.spec.js b/js/tests/unit/util/sanitizer.spec.js index 395875d624..869b8c5615 100644 --- a/js/tests/unit/util/sanitizer.spec.js +++ b/js/tests/unit/util/sanitizer.spec.js @@ -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', () => { -- cgit v1.2.3