mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
perf: HTTP node jsonBody support \n (#4070)
This commit is contained in:
@@ -140,7 +140,8 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
|
|||||||
|
|
||||||
if (typeof val === 'string') {
|
if (typeof val === 'string') {
|
||||||
if (isQuoted) {
|
if (isQuoted) {
|
||||||
return val.replace(/(?<!\\)"/g, '\\"');
|
// Replace newlines with escaped newlines
|
||||||
|
return val.replace(/\n/g, '\\n').replace(/(?<!\\)"/g, '\\"');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
JSON.parse(val);
|
JSON.parse(val);
|
||||||
|
Reference in New Issue
Block a user