From 56495e5efc52dbac9fe0c3adae4295ed0816ae84 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 2 Nov 2020 15:02:16 +0200 Subject: [PATCH] Backport #32045 tests: fix sanitizer test. The test template does not include a `script` tag so the test always returned true. --- js/tests/unit/tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index fb308cf38883..4f55007c71d6 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -1170,7 +1170,7 @@ $(function () { }) var tooltip = $trigger.data('bs.tooltip') - assert.strictEqual(tooltip.config.template.indexOf('script'), -1) + assert.strictEqual(tooltip.config.template.indexOf('href="javascript:alert(7)"'), -1) }) QUnit.test('should allow custom sanitization rules', function (assert) {