Skip to main content
Answered

Escape quotation in custom actions

  • April 13, 2023
  • 1 reply
  • 112 views

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\&quot;">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.

Best answer by Jacob Cox

Hi @Eric Bryan !

 

HTML tags currently aren’t supported in the request body of a Custom Action. Regarding the use of those escape slashes, I can see that you’ve reached out to our Support Team about this and they opened up an issue with our Product Team for them to look into it. For now, though, those escape slashes don’t appear to be supported either. Our Support team will reach back out to you in your conversation with any updates around that!

View original
Did this topic help you find an answer to your question?

1 reply

Jacob Cox
Intercom Team
Forum|alt.badge.img+5
  • Sr. Technical Support Engineer
  • 441 replies
  • Answer
  • April 22, 2023

Hi @Eric Bryan !

 

HTML tags currently aren’t supported in the request body of a Custom Action. Regarding the use of those escape slashes, I can see that you’ve reached out to our Support Team about this and they opened up an issue with our Product Team for them to look into it. For now, though, those escape slashes don’t appear to be supported either. Our Support team will reach back out to you in your conversation with any updates around that!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings