title: Escape Quotes In Flask
body: <p>I have a python backend which is connected to the website using Flask. So In the python backend I am passing a variable in this manner</p>
  <pre><code>return flask.render_template('index.html', code = code)
  </code></pre>
  <p>and I want to use the value of the variable in the JavaScript so I'm doing something like this</p>
  <pre><code>&lt;script&gt; 
       var script = {{code}}
       console.log(script)
  &lt;/script&gt;
  </code></pre>
  <p>mind you I'm passing the value as a string. So For Example I'm Passing the value</p>
  <pre><code>TOKEN = &quot; somevaluehere &quot;
  </code></pre>
  <p>as a string in the variable <code>code</code> and when I print it out in the console, this is what I get</p>
  <pre><code>TOKEN = &amp;#39; somevaluehere &amp;#39;
  </code></pre>
  <p>This is causing a lot of problems, I tried escaping the quotes with a <code>\</code> but nothing works.</p>
  <p>Maybe Something Stupid. But can someone please point it out</p>