translate xml->json \n correctly
This commit is contained in:
parent
2acacbf087
commit
1e88c38877
2 changed files with 7 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
||||||
# Clixon Changelog
|
# Clixon Changelog
|
||||||
|
|
||||||
## 3.6.0 (Upcoming)
|
## 3.6.0 (Upcoming)
|
||||||
|
### Major changes:
|
||||||
|
### Minor changes:
|
||||||
|
### Corrected Bugs
|
||||||
|
* Translate xml->json \n correctly
|
||||||
|
|
||||||
## 3.5.0 (12 February 2018)
|
## 3.5.0 (12 February 2018)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,9 @@ json_str_escape(char *str)
|
||||||
for (i=0;i<strlen(str);i++)
|
for (i=0;i<strlen(str);i++)
|
||||||
switch (str[i]){
|
switch (str[i]){
|
||||||
case '\n':
|
case '\n':
|
||||||
|
snew[j++]='\\';
|
||||||
|
snew[j++]='n';
|
||||||
|
break;
|
||||||
case '\"':
|
case '\"':
|
||||||
case '\\':
|
case '\\':
|
||||||
snew[j++]='\\';
|
snew[j++]='\\';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue