mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-03-29 11:11:43 +01:00
added support for backslash
otherwise \ isn't being sent normally ( or not being read)
This commit is contained in:
parent
0365947c3f
commit
b3806b21f4
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user