From: Johann-S Date: Wed, 30 May 2018 07:41:05 +0000 (+0200) Subject: fix(tooltip): xss in container option X-Git-Tag: v4.1.2~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d90d369bbc2bd2647620246c55cec8c4705e3d0;p=thirdparty%2Fbootstrap.git fix(tooltip): xss in container option --- diff --git a/js/src/tooltip.js b/js/src/tooltip.js index ed10057ed0..3d4e93f2b8 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -273,7 +273,7 @@ const Tooltip = (($) => { const attachment = this._getAttachment(placement) this.addAttachmentClass(attachment) - const container = this.config.container === false ? document.body : $(this.config.container) + const container = this.config.container === false ? document.body : $(document).find(this.config.container) $(tip).data(this.constructor.DATA_KEY, this) diff --git a/js/tests/visual/tooltip.html b/js/tests/visual/tooltip.html index 91713044ab..d81b018cc5 100644 --- a/js/tests/visual/tooltip.html +++ b/js/tests/visual/tooltip.html @@ -27,27 +27,40 @@
-

- - - - - - -

+
+

+ + + + + +

+
+
+

+ + + +

+
+