mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 14:27:27 -08:00
HTML-escape label values in Rickshaw hover-detail.
This commit is contained in:
parent
942686427d
commit
8f6ef04d70
|
@ -365,7 +365,7 @@ Prometheus.Graph.prototype.renderLabels = function(labels) {
|
||||||
var labelStrings = [];
|
var labelStrings = [];
|
||||||
for (label in labels) {
|
for (label in labels) {
|
||||||
if (label != "__name__") {
|
if (label != "__name__") {
|
||||||
labelStrings.push("<strong>" + label + "</strong>: " + labels[label]);
|
labelStrings.push("<strong>" + label + "</strong>: " + escapeHTML(labels[label]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return labels = "<div class=\"labels\">" + labelStrings.join("<br>") + "</div>";
|
return labels = "<div class=\"labels\">" + labelStrings.join("<br>") + "</div>";
|
||||||
|
|
Loading…
Reference in a new issue