When setting up a custom action, I am unable to properly escape quotation characters in the request body. In my particular case I am trying to include some html in the body, which in order to be proper json format needs to have the quotations escaped.
For example, I’ll attempt to have this body:
{
"type": "admin",
"message_type": "comment",
"body": "<a href=\"https://google.com\">Rupa</a>",
"admin_id": 5384099
}
But when I click next, and then come back to the body, the editor has replaced it with
{
"type": "admin",
"message_type": "comment",
"body": "<a href="\"https://google.com\"">Rupa</a>",
"admin_id": 5384099
}
Similarly, if I use single quotes, those get replaced with normal double quotes. Or if I leave the quotes out, they are added.
So clearly, the editor is trying to add quotes to the html to ‘correct’ it, but in effect is making it impossible to actually write correct json.
Is there a way to get around this, or turn this feature off? Seems poorly thought through, as I can’t imagine I’d find this helpful even if it worked properly.