title: TinyMCE - Set Editor Content
body: <p>I am building an auto-save feature for my TinyMCE editor.</p>
  
  <p>With jQuery, I have saved the editor's content to my database and now want to load the content back in to the editor. I am having troubles with the quotes (") in the HTML coming from the DB.</p>
  
  <p>My code:</p>
  
  <pre><code>var content = "&lt;%=content%&gt;" // Classic ASP variable containing HTML from DB
  tinyMCE.activeEditor.setContent(content);
  </code></pre>
  
  <p>Example output:</p>
  
  <pre><code>var content = "&lt;p&gt;Oh yes, from Churchill, the &lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;dog&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;.&lt;/p&gt;"
  tinyMCE.activeEditor.setContent(content);
  </code></pre>
  
  <p>In the variable, "content", there are double quotes in the style tag which is causing a JS error. How do I get around this? Do I replace quotes with single quotes or do I use an escape or encode function? Please help.</p>