Merge pull request #1133 from prometheus/escape-string-values

HTML-escape string return values in web UI.
This commit is contained in:
Julius Volz 2015-10-01 15:36:11 +02:00
commit d025fcd4e2
2 changed files with 232 additions and 194 deletions

File diff suppressed because one or more lines are too long

View file

@ -601,7 +601,7 @@ Prometheus.Graph.prototype.handleConsoleResponse = function(data, textStatus) {
tBody.append("<tr><td>scalar</td><td>" + data.result[1] + "</td></tr>");
break;
case "string":
tBody.append("<tr><td>string</td><td>" + data.result[1] + "</td></tr>");
tBody.append("<tr><td>string</td><td>" + escapeHTML(data.result[1]) + "</td></tr>");
break;
default:
self.showError("Unsupported value type!");