Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the SVG-TT-Graph CPAN distribution.

Report information
The Basics
Id: 38441
Status: resolved
Worked: 15 min
Priority: 0/
Queue: SVG-TT-Graph

People
Owner: IANRODDIS [...] cpan.org
Requestors: terencemo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.02
  • 0.03
  • 0.04
  • 0.06
  • 0.07
  • 0.08
  • 0.09
  • 0.10
Fixed in: 0.11



Subject: Ampersand in field names causes XML error
Thanks, Leo, for a very useful module. I maintain Catalyst::View::PNGTTGraph which depends on your module. When fields in the input fields list are passed in your constructor, if they have an ampersand, I get an XML error as follows: XML Parsing Error: not well-formed Location: http://localhost:5000/chart/pie_graph Line Number 1210, Column 77: <text x="47" y="74" class="keyText" style="text-anchor: start">Bar&Bender [125] </text> -------------------------------------------------------------------------------------------------^ The ampersand seems to cause the XML parser to expect a special XML character code. I assume that if someone is passing an ampersand, they want it to show up as such in the labels. I've added a patch to change ampersands to &amp; Thanks again for a handy module!
Subject: Graph.pm.patch
154c154 < @new_data{@{$self->{'config'}->{'fields'}}} = @{$conf->{'data'}}; --- > @new_data{ map { s/&/&amp;/ } @{$self->{'config'}->{'fields'}}} = @{$conf->{'data'}};
A correction in the patch. Sorry for the inconvenience.
154c154 < @new_data{@{$self->{'config'}->{'fields'}}} = @{$conf->{'data'}}; --- > @new_data{ map { s/&/&amp;/; $_ } @{$self->{'config'}->{'fields'}}} = @{$conf->{'data'}};
Hello, I've submitted version 0.11, and included the fix for this problem in there. Please let me know if you run into any problems. Regards, Ian