]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Backport #32045
authorXhmikosR <xhmikosr@gmail.com>
Mon, 2 Nov 2020 13:02:16 +0000 (15:02 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Thu, 5 Nov 2020 09:22:05 +0000 (11:22 +0200)
tests: fix sanitizer test.

The test template does not include a `script` tag so the test always returned true.

js/tests/unit/tooltip.js

index fb308cf3888338dcc37916bc77dfceb1d01c1663..4f55007c71d675ed5fd8275e23e173d9465feb07 100644 (file)
@@ -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) {