AutomaApp / automa

A browser extension for automating your browser by connecting blocks
https://www.automa.site
Other
10.72k stars 1.09k forks source link

The quotation marks are not escaped correctly #1741

Open zyblog123 opened 1 month ago

zyblog123 commented 1 month ago

Describe the bug I expect a POST request with the body below should be sent after my workflow failed. {"errorMessage": "{{workflow.errorMessage}}"}

However, an illegal JSON body below was sent. It seems that the quotation marks are not escaped correctly. {"errorMessage": "Unexpected token \'<\', "<!doctype "... is not valid JSON"}

To Reproduce Steps to reproduce the behavior:

  1. Create a workflow that will error. For example, send an HTTP request that expects the response to be JSON but the actual response is HTML.
  2. Make the workflow send a POST request with the body below after it fails. {"errorMessage": "{{workflow.errorMessage}}"}
  3. An illegal JSON body below was sent. {"errorMessage": "Unexpected token \'<\', "<!doctype "... is not valid JSON"}

Expected behavior A legal JSON body with correctly escaped quotation marks should be sent. {"errorMessage": "Unexpected token \'<\', \"<!doctype \"... is not valid JSON"}

Screenshots Expect: pic1 Actual: pic2

Desktop (please complete the following information):

Additional context No additional context