From bcad4bcb5f5a9ef079b2883a48a698b35261e083 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Fri, 25 Aug 2017 21:54:49 +0200 Subject: [PATCH] Fix XSS in data-target --- js/src/util.js | 2 +- js/tests/visual/modal.html | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 @@ + + -- 2.47.2