Open Zincr0 opened 1 year ago
Note: strconv.Quote() seems to be doing the job quite well in my latest tests
I've investigated the issue a bit. There are two separate challenges:
draw.DOT
and is a feature on its own.\"
) like in your example. The escaping backslash being removed is a bug, and it seems to happen when rendering the template: https://go.dev/play/p/DvuB5B8ywIVI'll focus on the \"
bug for now. Maybe the escaping backslash can be preserved somehow.
Using draw.DOT over a network with valid golang string nodes, generates invalid .gv files if any string contain some special characters
example:
Will generate
which will fail trying to use dot -Tsvg -O mygraph.gv since it has non escaped characters
I think a flag to optionaly escape html entities may be a good alternative