From 77c24f6b70df2b23c7bd5d4d67240850d1b83005 Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Wed, 16 Jul 2014 23:24:16 +0200 Subject: [PATCH] Escape labels in hover --- lib/morris.bar.coffee | 3 ++- lib/morris.line.coffee | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/morris.bar.coffee b/lib/morris.bar.coffee index fba8037c..f623f6b7 100644 --- a/lib/morris.bar.coffee +++ b/lib/morris.bar.coffee @@ -233,7 +233,8 @@ class Morris.Bar extends Morris.Grid # @private hoverContentForRow: (index) -> row = @data[index] - content = "
#{row.label}
" + content = $("
").text(row.label) + content = content.prop('outerHTML') for y, j in row.y if @options.labels[j] is false continue diff --git a/lib/morris.line.coffee b/lib/morris.line.coffee index 7f50d949..ffc54bb6 100644 --- a/lib/morris.line.coffee +++ b/lib/morris.line.coffee @@ -107,7 +107,8 @@ class Morris.Line extends Morris.Grid # @private hoverContentForRow: (index) -> row = @data[index] - content = "
#{row.label}
" + content = $("
").text(row.label) + content = content.prop('outerHTML') for y, j in row.y if @options.labels[j] is false continue