jlab / gapc

Bellman's GAP compiler
GNU General Public License v3.0
7 stars 6 forks source link

escape CHAR('&') for plot-grammar #218

Closed sjanssen2 closed 1 year ago

sjanssen2 commented 1 year ago

Properly escape CHAR('&') via CHAR('&') for graphviz output to avoid e.g. image

kmaibach commented 1 year ago

Do we need something like this for other characters as well? What about < or >?

sjanssen2 commented 1 year ago

Do we need something like this for other characters as well? What about < or >?

@kmaibach you are probably right! Question remains, which characters should be escaped? I started from here https://stackoverflow.com/questions/5665231/most-efficient-way-to-escape-xml-html-in-c-string and found that ' and " work natively, thus it is >, < and & (for now?!)

kmaibach commented 1 year ago

Do we need something like this for other characters as well? What about < or >?

@kmaibach you are probably right! Question remains, which characters should be escaped? I started from here https://stackoverflow.com/questions/5665231/most-efficient-way-to-escape-xml-html-in-c-string and found that ' and " work natively, thus it is >, < and & (for now?!)

Yes, that's what I found as well. I believe it's good for now. We can just extend this should other issues arise