How can I encode special characters?

I am currently using encodeURI, however it does not work in some cases, such as with single quotes or commas.

Are other types of encodings available?

Thank you

Hi @marco.fucito, which kind of encoding would you need? N8n nodes would usually encode data in line with what the connecting service expects. E.g. if I were to send an HTTP Request to o=bar using the respective node, there would be no difference between the space and %20. So it would be great to understand what you’re looking for. Maybe there’s already a suitable node :slight_smile:

I need to pass a json as input to a python function.
The json contains spaces, can contain quotes, and commas.
To manage the presence of spaces, up to now I have used url encoding, but if there are commas and quotes in the json, url encoding does not work.

So I would like to replace the url encoding with a more complete encoding

{{encodeURI(JSON.stringify($node[“Typeform Trigger”].json[“form_response”][“answers”]))}}