Graph viewer: node names are not escaped
In a graph query being displayed by the graph viewer, when the value for semmle.label contains backslashes, they appear to be interpreted by graphviz, when I would expect them to appear as literal backslashes. Here's an example:
/**
* @kind graph
* @id foo
*/
query predicate nodes(string node, string attr, string val) {
node in ["foo\\bar", "x\\ny", "p\\q\\r\\s"] and
attr = "semmle.label" and
val = node
}
query predicate edges(string a, string b, string attr, string val) { none() }
It looks like this:

I would expect to see the actual string x\ny rather than x<newline>y.
This affected me when I was using the graph viewer to visualize parsed regexes, which often contain backslashes.
Version
VS Code: 1.66.2 CodeQL extension: 1.6.5
Curious....does it do what you expect if you double escape? ie- x\\ny --> x\\\\ny
Yes, if I write the QL string "x\\\\ny" (which, after QL's escaping, has the value x\\ny), then the graph gets rendered with x\ny. I assume what's happening is that graphviz treats \ as an escape character, and \\ is the way to escape a single backslash.
Hmmm...interesting. I think what needs to happen is that strings are escaped in vscode before rendering them to the graph.