escape dollar chars in strings

not escape the char, but trigger the quotes, actually
This commit is contained in:
ac-stef
2016-08-22 15:08:20 +02:00
parent 97c21ea044
commit 71132e3d35
+1 -1
View File
@@ -1483,7 +1483,7 @@ const char *escapestring(const char *s, bool force, bool noquotes)
static int stridx = 0;
if(noquotes) force = false;
if(!s) return force ? "\"\"" : "";
if(!force && !*(s + strcspn(s, "\"/\\;()[] \f\t\r\n"))) return s;
if(!force && !*(s + strcspn(s, "\"/\\;()[] \f\t\r\n$"))) return s;
stridx = (stridx + 1) % 3;
vector<char> &buf = strbuf[stridx];
buf.setsize(0);