title: Escaping double quotes while rendering in Jinja2
body: <p>I'm using Jinja2 to create Golang code using Python3. I need to pass some parameters in quotes to a function in my final code, but Jinja2 isn't escaping double quotes.
  My python code is something like:</p>
  
  <pre><code>list_s = ['a', 'b']
  string = '\"' + '", "'.join(list_s) + '\"'
  final_string = 'Function(' + string + ')'
  print(final_string)
  
  template.render({'function': final_string})
  </code></pre>
  
  <p>My template is:</p>
  
  <pre><code>e.({{function}})
  </code></pre>
  
  <p>What I'm getting in the console (the print in the python code):</p>
  
  <pre><code>Function("a", "b")
  </code></pre>
  
  <p>What I wanted in my final code in Go:</p>
  
  <pre><code>e.(Function("a", "b"))
  </code></pre>
  
  <p>What I'm actually getting in my final code:</p>
  
  <pre><code>e.(Function(&amp;#34;a&amp;#34;, &amp;#34;b&amp;#34;))
  </code></pre>
  
  <p>I've already tried:</p>
  
  <pre><code>'`\"`' , '`"`', "'\"'", "\\\"", "\N{Quotation Mark}"
  </code></pre>
  
  <p>And none of them worked as I wanted. Any ideas?</p>
  
  <p>Thank you :))</p>
  
  <p><strong>"Solved":</strong></p>
  
  <p>I changed from double quotes to `, so my python code now is:</p>
  
  <pre><code>string = '`' + '`, `'.join(list_s) + '`'
  </code></pre>
  
  <p>And my final Go code is:</p>
  
  <pre><code>e.(Function(`a`, `b`))
  </code></pre>
  
  <p>And this works on Go. It isn't the best solution but it is working...</p>