From: Johann-S Date: Fri, 25 Aug 2017 19:54:49 +0000 (+0200) Subject: Fix XSS in data-target X-Git-Tag: v4.0.0-beta.2~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcad4bcb5f5a9ef079b2883a48a698b35261e083;p=thirdparty%2Fbootstrap.git Fix XSS in data-target --- diff --git a/js/src/util.js b/js/src/util.js index 69fb8283cc..cd3f1fb6a2 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -117,7 +117,7 @@ const Util = (($) => { } try { - const $selector = $(selector) + const $selector = $(document).find(selector) return $selector.length > 0 ? selector : null } catch (error) { return null diff --git a/js/tests/visual/modal.html b/js/tests/visual/modal.html index c9a950b8c3..da9bbf93ab 100644 --- a/js/tests/visual/modal.html +++ b/js/tests/visual/modal.html @@ -167,6 +167,10 @@ + +