Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
Fix JSON escaping (better) (FlowiseAI#2498)
Browse files Browse the repository at this point in the history
Fix JSON escaping
  • Loading branch information
mokeyish authored May 30, 2024
1 parent eb738a1 commit d505637
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ export const getVariableValue = (
const variableValue = variableDict[path]
// Replace all occurrence
if (typeof variableValue === 'object') {
returnVal = returnVal.split(path).join(JSON.stringify(variableValue).replaceAll('"', '\\"').replaceAll('\\n', '\\\\n'))
returnVal = returnVal.split(path).join(JSON.stringify(JSON.stringify(variableValue)))
} else {
returnVal = returnVal.split(path).join(variableValue)
}
Expand Down

0 comments on commit d505637

Please sign in to comment.