wrong URL interpretation for SVG

hi!

when trying to use an URL with a "&" inside the graph will not build a correct SVG file. Think of this:

digraph test1 {
node0 [label=node0];
node1 [label=node1 URL="http://test.com/"];
node2 [label=node2 URL="http://test.com/bla.php?var1=1&var2=2"];

node0->node1;
node0->node2;
}

and building a SVG with: dot.exe -Tsvg

shows a graphic with only an edge between node0 and node1, but nothing else, not even node2.

When you remove the "&" in the URL of node2, the graph is displayed correctly, but obviously this is useless since the link doesn't work any more...

How to escape? %26 did not work, graph is displayed, but link is broken.

Please help!

Ralf.

For some reason, I removed

For some reason, I removed the conversion of the url string to legal xml. I remember there was an example where a valid url didn't work when the conversion was done. Unfortunately, I can't recall the example now. I'll see if I can find the problem and, if not, i can restore the conversion, but as we no longer are able to build Windows versions of Graphviz, this may not help you. As a simple workaround, you can do the conversion yourself and replace you '&' with '&'.

workaround applied

Thanks, erg, for the &amp-Tip. I didn't thought of this. It works, although I have to pre-process my data.

Thanks. Ralf.

Recent comments