Issue #401 new

CanvasAxisTextRenderer does not convert & to &

Kevin Risden
created an issue

When using the CanvasAxisLabelRenderer & characters are not converted back to & before being displayed. The data should be stored as & so that the page validates but then should be converted to & when being displayed.

This short jQuery snipit can do the conversion for you easily.

$('<div />').html(text_to_fix).text()

I was able to get it to work by changing two lines in jqplot.canvasTextRenderer.js

110 this.text = $('<div />').html(t).text();

415 ctx.fillText($('<div />').html(str).text(), x, y);

In my short tests this doesn't break any compatibility with existing features.

Comments (2)

  1. Log in to comment