Encoding HTML to pass through HTTP request

I am reading in content in markdown, convert to HTML, then need to pass that with HTTP request to an API (mautic).

If I pass the full HTML through the JSON to the API, the request fails, presumably because of the “quotes”. If I encode the HTML, it works and is received correctly by the API.

So my question is: How do I encode this HTML programmatically?

Thanks in advance!

EP

Hi @Entrepositive, do you have an example of how you want to encode your string? As in, which value do you currently have and what do you need instead?

Also, can you share your workflow, the error you are getting and the n8n version you are currently using?

In general, quotes wouldn’t cause trouble:

This workflow works fine, even though it includes double quotes.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.