mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Security: Fixes javascript security warnings in old vendored libs (#50382)
This commit is contained in:
parent
58a783c0e4
commit
74608d6480
15
public/vendor/bootstrap/bootstrap.js
vendored
15
public/vendor/bootstrap/bootstrap.js
vendored
@ -202,7 +202,7 @@
|
||||
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()
|
||||
|
||||
@ -480,7 +480,7 @@
|
||||
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function(e) {
|
||||
var $this = $(this)
|
||||
, 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())
|
||||
|
||||
e.preventDefault()
|
||||
@ -633,7 +633,11 @@
|
||||
.detach()
|
||||
.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()
|
||||
|
||||
@ -745,7 +749,8 @@
|
||||
var $tip = this.tip()
|
||||
, 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')
|
||||
}
|
||||
|
||||
@ -950,7 +955,7 @@
|
||||
|
||||
if (e.isDefaultPrevented()) return
|
||||
|
||||
$target = $(selector)
|
||||
$target = $.find(selector)
|
||||
|
||||
this.activate($this.parent('li'), $ul)
|
||||
this.activate($target, $target.parent(), function() {
|
||||
|
8
public/vendor/flot/jquery.flot.js
vendored
8
public/vendor/flot/jquery.flot.js
vendored
@ -2815,7 +2815,7 @@ Licensed under the MIT license.
|
||||
function insertLegend() {
|
||||
|
||||
if (options.legend.container != null) {
|
||||
$(options.legend.container).html("");
|
||||
$.find(options.legend.container).html("");
|
||||
} else {
|
||||
placeholder.find(".legend").remove();
|
||||
}
|
||||
@ -3020,10 +3020,12 @@ Licensed under the MIT license.
|
||||
j = item[1];
|
||||
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,
|
||||
series: series[i],
|
||||
seriesIndex: i };
|
||||
seriesIndex: i
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user