From d58c65048be50fe8f61c390c3246e04ae4371db3 Mon Sep 17 00:00:00 2001 From: JisanAR03 Date: Wed, 1 Nov 2023 22:18:44 +0600 Subject: [PATCH 1/2] Fix code scanning alert issue-#1355 --- website/static/vendor/bootstrap/js/bootstrap.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/static/vendor/bootstrap/js/bootstrap.js b/website/static/vendor/bootstrap/js/bootstrap.js index 399a50d1b..531ef5dc7 100644 --- a/website/static/vendor/bootstrap/js/bootstrap.js +++ b/website/static/vendor/bootstrap/js/bootstrap.js @@ -692,9 +692,9 @@ function sanitizeInput(input) { this[this.$element.hasClass('in') ? 'hide' : 'show']() } - Collapse.prototype.getParent = function () {var sanitizedParent = sanitizeSelector(this.options.parent); - return $(sanitizedParent) - .find('[data-toggle="collapse"][data-parent="' + sanitizedParent + '"]') + Collapse.prototype.getParent = function () { + return $(this.options.parent) + .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') .each($.proxy(function (i, element) { var $element = $(element) this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) @@ -791,7 +791,7 @@ function sanitizeInput(input) { Dropdown.VERSION = '3.3.7' function getParent($this) { - var selector = $this.attr('data-target') + var selector = sanitizeSelector($this.attr('data-target')) if (!selector) { selector = $this.attr('href') From 80096ea90910b1e47a3a0cfff5aabffc6ecaa5b8 Mon Sep 17 00:00:00 2001 From: JisanAR03 Date: Wed, 1 Nov 2023 22:20:38 +0600 Subject: [PATCH 2/2] Fix code scanning alert issue-#1355 --- website/static/vendor/bootstrap/js/bootstrap.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/static/vendor/bootstrap/js/bootstrap.js b/website/static/vendor/bootstrap/js/bootstrap.js index 531ef5dc7..55c9ff210 100644 --- a/website/static/vendor/bootstrap/js/bootstrap.js +++ b/website/static/vendor/bootstrap/js/bootstrap.js @@ -692,9 +692,9 @@ function sanitizeInput(input) { this[this.$element.hasClass('in') ? 'hide' : 'show']() } - Collapse.prototype.getParent = function () { - return $(this.options.parent) - .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') + Collapse.prototype.getParent = function () {var sanitizedParent = sanitizeSelector(this.options.parent); + return $(sanitizedParent) + .find('[data-toggle="collapse"][data-parent="' + sanitizedParent + '"]') .each($.proxy(function (i, element) { var $element = $(element) this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)