Number: 1969
Title: HREF in HTML label doesn't support &params
Submitter: Philippe Guglielmetti
Date: Thu Jun 3 08:29:49 2010
Subsys: Dot
Version: 2.26.3
System: *-*-*
Severity: minor
Problem:
URLs containing "&var=value" aren't accepted in <TD HREF="..."> with node HTML-Like labels.

No problem with the URL="..." syntax in nodes

BTW, URL="..." accepts relative urls while HREF="..." does not.

Ideally, I think HREF= should treat its url exactly as URL=
Input:

digraph nodetest {

  node [shape=box fontname="MS Sans Serif" fontsize=9];
  edge [arrowhead=empty fontname="MS Sans Serif" fontsize=9];

  "test" [label=<test>       ];
  "Valid Link" [label=<Valid Link>   URL="/wiki/index.php?title=Template:Node" fontcolor=blue    ];
   "Broken Link" [label=<Broken Link> tooltip="please do not create this page"  URL="/wiki/index.php?title=BrokenLink&action=edit" fontcolor=red    ];
  "Extern Link" [label=<Extern Link>   URL="http://wikipedia.org" fontcolor =blue    ];
  "test6" [label=<<TABLE       ><TR>
<TD  >a table</TD></TR><TR>
<TD  >with a row</TD></TR></TABLE>>  shape=plaintext     ];
  "test7" [label=<<TABLE       ><TR>
<TD  HREF="http://osterone/wiki/index.php?title=Template:Node"><FONT COLOR="blue">a valid link</FONT></TD></TR><TR>
<TD  HREF="http://osterone/wiki/index.php?title=BrokenLink&action=edit"><FONT COLOR="red">an invalid link</FONT></TD></TR></TABLE>>  shape=plaintext     ];

}
Comments:
dot complains : Error: not well-formed (invalid token) in line 3

..
<TD  HREF="http://osterone/wiki/index.php?title=BrokenLink&action=edit"> ...
in label of node test7

FYI, the graph source above is produced by a set of MediaWiki templates that automatically create links to wiki pages from nodes, coloring the text in blue if the target page exists, red if it doesn't. I'll publish all this once it works ;-)

[erg] Graphviz uses libexpat to parse the HTML-like strings. This means that raw ampersands can't occur within <...>. That said, if you replace your '&' characters with "&amp;", dot will parse the input without error and you'll end up with the same URL as you would have gotten with the URL attribute. That is,


   URL="http://osterone/wiki/index.php?title=BrokenLink&action=edit"
and

  HREF="http://osterone/wiki/index.php?title=BrokenLink&amp;action=edit"

will produce identical output.

> BTW, URL="..." accepts relative urls while HREF="..." does not.

Could you give more details about this? I find that relative URLs work fine via HREF.
Owner: erg
Status: Fixed (9 Jun 2010)