Edit Fields Node fails in JSON mode when "$&" in expression
Issue Details
Author
Bug Description
When using the Set/Edit Fields node in JSON mode and an expression contains a string with the 2 characters "$&" together, the node fails to parse the JSON and gives the following error The 'JSON Output' in item 0 contains invalid JSON
.
Good to know
- Did a few checks and it seems to be working fine in expressions in general
To Reproduce
- Add "Edit Fields" node
- Switch to JSON mode
- Add expression which simply returns an object with a string property containing the characters "$&" together
- Execute node and the error should display
Expected behavior
As the JSON object is valid, there shouldn't be a JSON parse error.
Operating System
Linux, Mac
n8n Version
1.103.0 and 1.84.3
Node.js Version
???
Database
PostgreSQL
Execution mode
main (default)
Issue Details
Edit Fields Node fails in JSON mode when "$&" in expression
Author
Bug Description
When using the Set/Edit Fields node in JSON mode and an expression contains a string with the 2 characters "$&" together, the node fails to parse the JSON and gives the following error The 'JSON Output' in item 0 contains invalid JSON
.
Good to know
- Did a few checks and it seems to be working fine in expressions in general
To Reproduce
- Add "Edit Fields" node
- Switch to JSON mode
- Add expression which simply returns an object with a string property containing the characters "$&" together
- Execute node and the error should display
Expected behavior
As the JSON object is valid, there shouldn't be a JSON parse error.
Operating System
Linux, Mac
n8n Version
1.103.0 and 1.84.3
Node.js Version
???
Database
PostgreSQL
Execution mode
main (default)