2

I am writing project on Node.js + Express.js with templating Swig. On the user side using a template system doT.js

The question arose in the browser to pass a line like:

<h1> string {{= it.stringVar}} </ h1>

But I do not know how to make Swig not handle as part of the string variable (ie not handle braces).

Is there any mechanism to solve my problem?

Thanks in advance!

JstnPwll
  • 8,585
  • 2
  • 33
  • 56

1 Answers1

3
{% raw %}<h1> string {{= it.stringVar}} </ h1>{% endraw %}

Read more in swig docs.

Dmytro Sadovnychyi
  • 6,171
  • 5
  • 33
  • 60