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

This commit is contained in:
灰灰 2024-08-11 16:32:06 +08:00 committed by GitHub
parent 700d37be8d
commit ac60182c91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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