Skip to content

Commit

Permalink
Update new_http.c
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Jan 11, 2025
1 parent 58d4336 commit 37c8a02
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/httpserver/new_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ void poststr_escapedForJSON(http_request_t* request, char* str) {
case '\n':
foundChar = true;
break;
case '\r':
foundChar = true;
break;
case '\"':
foundChar = true;
break;
}
}

Expand All @@ -225,6 +231,12 @@ void poststr_escapedForJSON(http_request_t* request, char* str) {
case '\n':
postany(request, "\\n", 2);
break;
case '\r':
postany(request, "\\r", 2);
break;
case '\"':
postany(request, "\\\"", 2);
break;
default:
postany(request, str + i, 1);
break;
Expand Down

0 comments on commit 37c8a02

Please sign in to comment.