diff --git a/public/app/plugins/panel/graph/graph_tooltip.ts b/public/app/plugins/panel/graph/graph_tooltip.ts index 0c2dec69c1e..c8397616caf 100644 --- a/public/app/plugins/panel/graph/graph_tooltip.ts +++ b/public/app/plugins/panel/graph/graph_tooltip.ts @@ -1,6 +1,7 @@ import $ from 'jquery'; import { appEvents } from 'app/core/core'; import { CoreEvents } from 'app/types'; +import { sanitize } from 'app/core/utils/text'; export default function GraphTooltip(this: any, elem: any, dashboard: any, scope: any, getSeriesFn: any) { const self = this; @@ -256,12 +257,13 @@ export default function GraphTooltip(this: any, elem: any, dashboard: any, scope series = seriesList[hoverInfo.index]; - value = series.formatValue(hoverInfo.value); + value = series.formatValue(sanitize(hoverInfo.value)); + const color = sanitize(hoverInfo.color); + const label = sanitize(hoverInfo.label); seriesHtml += '