Best answer

How to escape curly brackets?

  • 22 October 2020
  • 4 replies
  • 861 views

Userlevel 1

I am creating an app which allows templating with the same syntax of merge tags as Zapier, double curly brackets.

But when a user creates a Zap and enters a double curly brackets into the textarea field, they are immediately converted into Zapier merge tags. How to avoid this?

Is there a way for user to escape them while entering text to avoid that conversion?

\{\{ or triple curly brackets or whatever?

icon

Best answer by Alex Kachalov 30 October 2020, 14:56

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +10

@Alex Kachalov 

I asked this to the Zapier team before - sadly it’s not possible.

I can get them to add your vote to a feature request if you want?

Userlevel 1

Yes, please.

Userlevel 7
Badge +10

@Alex Kachalov - I’ve flagged this post so someone can do that for you.

Userlevel 1

Owari Jules from Zapier support has offered me a workaround:

While there's no way to escape this in our system at the moment, you may be able to have the user use another character in the editor such as square brackets - [test test] in the Editor for their templating.

When sending out your POST request to your server, you can have some Code that finds and replaces all uses of the [ ] brackets with the { } instead.
 

Seems a viable solution