added support for backslash

otherwise \ isn't being sent normally ( or not being read)
This commit is contained in:
Vishal 2022-11-19 22:11:34 +05:30
parent 0365947c3f
commit b3806b21f4

View File

@ -1394,12 +1394,14 @@ class Contact {
String addEscapeChars(String str) {
String temp = str.replaceAll("\"", "\\\"");
temp = temp.replaceAll("\\", "\\\\");
return temp.replaceAll("\n", "\\n");
}
String unEscapeChars(String str) {
//print("in unEscape: |$str|");
String temp = str.replaceAll("\"", "\\\"");
temp = temp.replaceAll("\\\\", "\\");
temp = temp.replaceAll("\n", "\\n");
//print("returning |$temp|\n");
return temp;