Skip to content

Commit

Permalink
Escape graphvis meta char. (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shylock-Hg authored Apr 18, 2022
1 parent 5b81725 commit f9404f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions result_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,10 @@ func graphvizString(s string) string {
s = strings.Replace(s, "\"", "\\\"", -1)
s = strings.Replace(s, "[", "\\[", -1)
s = strings.Replace(s, "]", "\\]", -1)
s = strings.Replace(s, "(", "\\(", -1)
s = strings.Replace(s, ")", "\\)", -1)
s = strings.Replace(s, "<", "\\<", -1)
s = strings.Replace(s, ">", "\\>", -1)
return s
}

Expand Down

0 comments on commit f9404f5

Please sign in to comment.