title: Literal braces in Handlebars template
body: <p>I'm having difficulties including braces <code>{</code> <code>}</code> in a Handlebars template so that it didn't interfere with Handlebars syntax.</p>
  
  <p>Specifically, I want to have a template like this:</p>
  
  <pre><code>{{{sometag}}}
  </code></pre>
  
  <p>Except that I want the first and the last braces to be rendered literally, rather than be a part of Handlebar's "non-escaped expression" syntax.</p>
  
  <p>For now, the shortest portable syntax I could come up with is <code>{{#with "{"}}{{.}}{{/with}}</code>, so that the template that I want would look like:</p>
  
  <pre><code>{{#with "{"}}{{.}}{{/with}}{{sometag}}{{#with "}"}}{{.}}{{/with}}
  </code></pre>
  
  <p>I could use HTML entities (like <a href="https://stackoverflow.com/a/16278085/3088208">https://stackoverflow.com/a/16278085/3088208</a> suggests), or insert an HTML comment after the initial <code>{</code> and before the final <code>}</code>, but these solutions, while practical, depend on HTML which makes them limited.</p>
  
  <p>P. S. Found a duplicate question: <a href="https://stackoverflow.com/questions/52020784">Escaping curly brackets standing next to expression in handlebars</a></p>