Skip to content

Commit

Permalink
Fix code scanning alert issue-OWASP-BLT#1357
Browse files Browse the repository at this point in the history
  • Loading branch information
JisanAR03 committed Oct 31, 2023
1 parent 525973f commit b5c8edb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions website/static/vendor/bootstrap/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,9 @@ function sanitizeInput(input) {

function getTargetFromTrigger($trigger) {
var href
var target = $trigger.attr('data-target')
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7

return $(target)
var targetValue = $trigger.attr('data-target') || $trigger.attr('href');
var sanitizedTarget = sanitizeSelector(targetValue.replace(/.*(?=#[^\s]+$)/, '')); // strip for ie7 and sanitize
return $(sanitizedTarget);
}


Expand Down

0 comments on commit b5c8edb

Please sign in to comment.