Ver Fonte

fix: solving http-request-tool bugs in workflow (#6685)

灰灰 há 8 meses atrás
pai
commit
ac60182c91
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      api/core/workflow/nodes/http_request/http_executor.py

+ 1 - 1
api/core/workflow/nodes/http_request/http_executor.py

@@ -337,7 +337,7 @@ class HttpExecutor:
                 if variable is None:
                     raise ValueError(f'Variable {variable_selector.variable} not found')
                 if escape_quotes and isinstance(variable, str):
-                    value = variable.replace('"', '\\"')
+                    value = variable.replace('"', '\\"').replace('\n', '\\n')
                 else:
                     value = variable
                 variable_value_mapping[variable_selector.variable] = value