Security: Fixes javascript security warnings in old vendored libs (#50382)

pull/50275/head^2
Torkel Ödegaard 3 years ago committed by GitHub
parent 58a783c0e4
commit 74608d6480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      public/vendor/bootstrap/bootstrap.js
  2. 8
      public/vendor/flot/jquery.flot.js

@ -202,7 +202,7 @@
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
} }
$parent = selector && $(selector) $parent = selector && $.find(selector)
if (!$parent || !$parent.length) $parent = $this.parent() if (!$parent || !$parent.length) $parent = $this.parent()
@ -480,7 +480,7 @@
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function(e) { $(document).on('click.modal.data-api', '[data-toggle="modal"]', function(e) {
var $this = $(this) var $this = $(this)
, href = $this.attr('href') , href = $this.attr('href')
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 , $target = $.find($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
, option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
e.preventDefault() e.preventDefault()
@ -633,7 +633,11 @@
.detach() .detach()
.css({ top: 0, left: 0, display: 'block' }) .css({ top: 0, left: 0, display: 'block' })
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) if (this.options.container) {
$tip.appendTo($.find(this.options.container));
} else {
$tip.insertAfter(this.$element)
}
pos = this.getPosition() pos = this.getPosition()
@ -745,7 +749,8 @@
var $tip = this.tip() var $tip = this.tip()
, title = this.getTitle() , title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) //$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.find('.tooltip-inner').text(title)
$tip.removeClass('fade in top bottom left right') $tip.removeClass('fade in top bottom left right')
} }
@ -950,7 +955,7 @@
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
$target = $(selector) $target = $.find(selector)
this.activate($this.parent('li'), $ul) this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function() { this.activate($target, $target.parent(), function() {

@ -2815,7 +2815,7 @@ Licensed under the MIT license.
function insertLegend() { function insertLegend() {
if (options.legend.container != null) { if (options.legend.container != null) {
$(options.legend.container).html(""); $.find(options.legend.container).html("");
} else { } else {
placeholder.find(".legend").remove(); placeholder.find(".legend").remove();
} }
@ -3020,10 +3020,12 @@ Licensed under the MIT license.
j = item[1]; j = item[1];
ps = series[i].datapoints.pointsize; ps = series[i].datapoints.pointsize;
return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps), return {
datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
dataIndex: j, dataIndex: j,
series: series[i], series: series[i],
seriesIndex: i }; seriesIndex: i
};
} }
return null; return null;

Loading…
Cancel
Save