From 5857d7e6b3e0b50648d4f667f0c114ddafc8aa50 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 2 Nov 2020 11:40:32 +0200 Subject: [PATCH] tests: fix sanitizer test. 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(-) diff --git a/js/tests/unit/util/sanitizer.spec.js b/js/tests/unit/util/sanitizer.spec.js index 395875d62402..869b8c561581 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', () => {