Skip Menu |
 

This queue is for tickets about the GraphViz CPAN distribution.

Report information
The Basics
Id: 98427
Status: rejected
Worked: 20 min
Priority: 0/
Queue: GraphViz

People
Owner: Nobody in particular
Requestors: B.Candler [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.15



Subject: GraphViz doesn't escape double-quotes in strings
Date: Fri, 29 Aug 2014 10:37:40 +0100
To: bug-GraphViz [...] rt.cpan.org
From: Brian Candler <b.candler [...] pobox.com>
[Ubuntu 14.04, libgraphviz-perl 2.14-1, graphviz 2.36.0-0ubuntu3] Passing a label which contains double-quotes causes graphviz to fail. To replicate the problem: -------- use GraphViz; my $g = GraphViz->new(); $g->add_node( 'name' => '10.10.3.0/24', 'fillcolor' => '#ff6666', 'URL' => 'ip.html?id=19', 'label' => '10.10.3.0/24\\n"Router Group 3"', 'shape' => 'record' ); print $g->as_debug; $g->as_png("/tmp/out.png"); -------- Results: digraph test { ratio="fill"; node1 [URL="ip.html?id=19", fillcolor="#ff6666", label="10.10.3.0/24\n"Router Group 3"", shape="record"]; } Warning: <stdin>: syntax error in line 3 near 'Group' and a zero-byte PNG file is produced. According to http://www.graphviz.org/content/dot-language, double-quotes can be escaped by preceding with backslash. I've tested it and it works: e.g. manually create the following content and feed it to dot: digraph test { ratio="fill"; node1 [URL="ip.html?id=19", fillcolor="#ff6666", label="10.10.3.0/24\n\"Router Group 3\"", shape="record"]; }
Subject: Re: [rt.cpan.org #98427] GraphViz doesn't escape double-quotes in strings
Date: Sat, 30 Aug 2014 08:02:26 +1000
To: bug-GraphViz [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Download (untitled) / with headers
text/plain 1.7k
Hi Brian I'll look at it, but I do hope you realize that GraphViz is not supported and I wrote GraphViz2 to be immeasurably more flexible. On 29/08/14 19:38, Brian Candler via RT wrote: Show quoted text
> Fri Aug 29 05:38:02 2014: Request 98427 was acted upon. > Transaction: Ticket created by B.Candler@pobox.com > Queue: GraphViz > Subject: GraphViz doesn't escape double-quotes in strings > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: B.Candler@pobox.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=98427 > > > > [Ubuntu 14.04, libgraphviz-perl 2.14-1, graphviz 2.36.0-0ubuntu3] > > Passing a label which contains double-quotes causes graphviz to fail. To > replicate the problem: > > -------- > use GraphViz; > > my $g = GraphViz->new(); > $g->add_node( > 'name' => '10.10.3.0/24', > 'fillcolor' => '#ff6666', > 'URL' => 'ip.html?id=19', > 'label' => '10.10.3.0/24\\n"Router Group 3"', > 'shape' => 'record' > ); > > print $g->as_debug; > $g->as_png("/tmp/out.png"); > -------- > > Results: > > digraph test { > ratio="fill"; > node1 [URL="ip.html?id=19", fillcolor="#ff6666", > label="10.10.3.0/24\n"Router Group 3"", shape="record"]; > } > Warning: <stdin>: syntax error in line 3 near 'Group' > > and a zero-byte PNG file is produced. > > According to http://www.graphviz.org/content/dot-language, double-quotes > can be escaped by preceding with backslash. I've tested it and it works: > e.g. manually create the following content and feed it to dot: > > digraph test { > ratio="fill"; > node1 [URL="ip.html?id=19", fillcolor="#ff6666", > label="10.10.3.0/24\n\"Router Group 3\"", shape="record"]; > } > >
-- Ron Savage - savage.net.au
Download (untitled) / with headers
text/plain 748b
Hi Thanx for the report. I'm classifying this as not-a-bug because you're using an obsolete version of GraphViz. Your email says 'libgraphviz-perl 2.14-1'. V 2.15 does not have this bug. As it happens I'm releasing a new version of GraphViz2 today, so I've patched the docs for GraphViz too. The patch has to do with instructions for installing AT&T's Graphviz. Also, GraphViz has new instructions for App::cpanminus aka cpanm, which you'll be able to use to easily install the lastest versions of any module. Finally, the latest version of GraphViz will be 2.16 and for GraphViz2 it will be 2.33. They should be on CPAN shortly, and will also be available via my website. BTW: I see you're using Ubuntu. I use Debian V 7.6 myself. Cheers


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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