Skip Menu | You are currently an anonymous guest. | Login | Return to Main | About rt.cpan.org
 

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.

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

Owner: IANRODDIS <IANRODDIS [...] cpan.org>
Requestors: TERENCEMO <terence [...] deeproot.co.in>
Cc:
AdminCc:

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




X History Display mode: Brief headersFull headers
#   Wed Aug 13 10:32:16 2008 TERENCEMO - Ticket created  
Subject: Ampersand in field names causes XML error
[text/plain 802b]
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

[text/x-diff 172b]
154c154
< @new_data{@{$self->{'config'}->{'fields'}}} = @{$conf->{'data'}};
---
> @new_data{ map { s/&/&amp;/ } @{$self->{'config'}->{'fields'}}} = @{$conf->{'data'}};

#   Wed Aug 20 02:38:06 2008 TERENCEMO - Correspondence added  
[text/plain 56b]
A correction in the patch. Sorry for the inconvenience.


[text/x-diff 176b]
154c154
< @new_data{@{$self->{'config'}->{'fields'}}} = @{$conf->{'data'}};
---
> @new_data{ map { s/&/&amp;/; $_ } @{$self->{'config'}->{'fields'}}} = @{$conf->{'data'}};

#   Wed Aug 20 02:38:12 2008 TERENCEMO - Status changed from 'new' to 'open'  
#   Mon Feb 16 10:45:26 2009 IANRODDIS - TimeWorked changed from (no value) to '15'  
#   Mon Feb 16 10:45:27 2009 IANRODDIS - Status changed from 'open' to 'resolved'  
#   Mon Feb 16 10:45:31 2009 IANRODDIS - Given to IANRODDIS  
#   Mon Feb 16 10:45:31 2009 IANRODDIS - Fixed in 0.11 added  
#   Mon Feb 16 10:46:40 2009 IANRODDIS - Correspondence added  
[text/plain 152b]
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
#   Mon Feb 16 10:46:41 2009 RT_System - Status changed from 'resolved' to 'open'  
#   Mon Feb 16 10:48:05 2009 IANRODDIS - Status changed from 'open' to 'resolved'