Skip to content

Commit

Permalink
Merge branch 'main' into issue-OWASP-BLT#1338
Browse files Browse the repository at this point in the history
  • Loading branch information
DonnieBLT authored Oct 28, 2023
2 parents b800702 + f869d90 commit 4f5e88f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions website/static/vendor/bootstrap/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
}
}(jQuery);

function sanitizeSelector(selector) {
// Use a whitelist approach to only allow valid characters in a selector
return selector.replace(/[^\w-#.:]/g, '');
}
/* ========================================================================
* Bootstrap: transition.js v3.3.7
* http://getbootstrap.com/javascript/#transitions
Expand Down Expand Up @@ -112,8 +115,8 @@ if (typeof jQuery === 'undefined') {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

var $parent = $(selector === '#' ? [] : selector)
selector = sanitizeSelector(selector === '#' ? '' : selector);
var $parent = $(selector);

if (e) e.preventDefault()

Expand All @@ -139,7 +142,6 @@ if (typeof jQuery === 'undefined') {
removeElement()
}


// ALERT PLUGIN DEFINITION
// =======================

Expand Down

0 comments on commit 4f5e88f

Please sign in to comment.