aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2020-11-02 14:49:56 +0200
committerGitHub <[email protected]>2020-11-02 14:49:56 +0200
commite2697b05733e2b8a88d35912d604644862d609b4 (patch)
tree194fd557b42311d377ec14ee8ba3c28118eec3e5 /js
parent71010cb1e99c95619e71f271e941e7edb0c6ea37 (diff)
downloadbootstrap-e2697b05733e2b8a88d35912d604644862d609b4.tar.xz
bootstrap-e2697b05733e2b8a88d35912d604644862d609b4.zip
tests: fix sanitizer test. (#32045)
The test template does not include a `script` tag so the test always returned true.
Diffstat (limited to 'js')
-rw-r--r--js/tests/unit/util/sanitizer.spec.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/tests/unit/util/sanitizer.spec.js b/js/tests/unit/util/sanitizer.spec.js
index 395875d62..869b8c561 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', () => {