Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002068graphvizDotpublic2011-03-28 05:052011-04-28 04:03
ReporterChristophe Dupriez 
Assigned Toerg 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSx86-Windows-7OS Version
Summary0002068: Ampersand in HREF (HTML-like labels) + TARGET unsupported?
Description



Ampersands create parsing errors when they appear within an URL
(HREF in an HTML like label)
Also, a "target" attribute is not taken into account:
it would be very useful.
Steps To Reproduce

digraph G{
    jita_T [shape=plaintext,label=<
        <table border="1" cellborder="1" cellspacing="0">
          <tr>
            <td href="http://testing?cgi&about=T" [^] title="jita_T" target="_parent">1. Theoretical and General:
general level</td>
          </tr>
          <tr>
            <td href="http://testing?cgi&about=T&linkedRef=true">1</td> [^]
          </tr>
        </table>>];
    jita_TH [shape=plaintext,label=<
        <table border="1" cellborder="1" cellspacing="0">
          <tr>
            <td href="http://testing?cgi&about=TH" [^] title="jita_TH" target="_parent">Theoretical and
general aspects of
libraries and
information</td>
          </tr>
          <tr>
            <td href="http://testing?cgi&about=TH&linkedRef=true">1</td> [^]
          </tr>
        </table>>];
    jita_T->jita_TH;
}
Additional Information

[christophe]
<CD>
After submitting this report (using the form on the site), I tried to change "&" by "&". Parsing worked better but here is the cmapx output:

<map id="G" name="G">
<area shape="rect" id="jita_T" href="http://testing?cgi&about=T" [^] target="_parent" title="jita_T" alt="" coords="17,12,228,65"/>
<area shape="rect" id="jita_T" href="http://testing?cgi&about=T&linkedRef=true" [^] title="<TABLE>" alt="" coords="17,65,228,92"/>
<area shape="rect" id="jita_TH" href="http://testing?cgi&about=TH" [^] target="_parent" title="jita_TH" alt="" coords="51,153,195,252"/>
<area shape="rect" id="jita_TH" href="http://testing?cgi&about=TH&linkedRef=true" [^] title="<TABLE>" alt="" coords="51,252,195,279"/>
</map>

The ampersand remained "&" (which will not work).

Also, target="_parent" was transfered but not target="ELIS".
</CD>

[erg]
I believe this does work. The browser will convert the & to &. At least, that is what I see using Safari, Firefox and IE.
<CD>
> Also, target="_parent" was transfered but not target="ELIS".
</CD>
I don't see any appearance of ELIS in the source. Please submit input that uses this and the corresponding bad map output.

[christophe]
Thank you for this thorough check!

You are right on all points:
<CD>
* target="ELIS" was in my original file but missing in the reduced example I prepared to submit the bug. I checked: it is generated.
* & in image map is interpreted as an HTML entity even within an href. This is surprising me: it was not like that in <a href="..."> in the past. I checked and it works now! This breaks a very old principle I followed when coding (to never consider an URL like another HTML text)
</CD>

Just allow me to say that I would have save a lot of time if I knew that "&" must be written "&" in HREF within GraphViz HTML-like labels. It would be a nice addition to the documentation.

Thanks for taking the time to consider my problems!
    (and please accept my apologizes for disturbing you)

Christophe

P.S. The more I use GraphViz, the more I like it (and regret I discovered it only now...) When I present it to colleagues, they simply don't believe there is shortcut between conceptual relations and visual schemas. This is probably the biggest problem of GraphViz: people don't imagine it is possible!

TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID2156
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed
VERSION     2.26.3
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => erg


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker