mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-13 07:11:12 +01:00
Merge pull request #464 from JelteF/escape-hover
Escape labels in hover
This commit is contained in:
commit
1c66cfc4ac
2 changed files with 4 additions and 2 deletions
|
@ -233,7 +233,8 @@ class Morris.Bar extends Morris.Grid
|
|||
# @private
|
||||
hoverContentForRow: (index) ->
|
||||
row = @data[index]
|
||||
content = "<div class='morris-hover-row-label'>#{row.label}</div>"
|
||||
content = $("<div class='morris-hover-row-label'>").text(row.label)
|
||||
content = content.prop('outerHTML')
|
||||
for y, j in row.y
|
||||
if @options.labels[j] is false
|
||||
continue
|
||||
|
|
|
@ -107,7 +107,8 @@ class Morris.Line extends Morris.Grid
|
|||
# @private
|
||||
hoverContentForRow: (index) ->
|
||||
row = @data[index]
|
||||
content = "<div class='morris-hover-row-label'>#{row.label}</div>"
|
||||
content = $("<div class='morris-hover-row-label'>").text(row.label)
|
||||
content = content.prop('outerHTML')
|
||||
for y, j in row.y
|
||||
if @options.labels[j] is false
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue