title: how to use smarty vars {html} output in jquery function
body: <p>i am working on a small project to grab some html codes stored in mysql, assign using smarty then use jquery to assign the value to a  in html. so far i am able to get this working but for jquery is not processing the html codes. </p>
  
  <p>jquery</p>
  
  <pre><code>{literal}
  &lt;script&gt;
  
  function code(val){
  var id = val;
  
  if (id == 'msg'){
  $('#txt_codes').val('{/literal}{$eml_codes}{literal}');}
  
  }
  &lt;/script&gt;
  {/literal}
  
  {$eml_codes} // outputs fine in html but nothing in jquery. if i use regular text rather 
  than html codes it works.
  
  //options
  
  &lt;select name="type" onchange="code(this.value)"&gt; 
  &lt;option value"msg"&gt;MSG&lt;/option&gt;
  &lt;option value"other"&gt;other&lt;/option&gt;
  &lt;/select&gt;
  
  //textarea
  &lt;textarea  id="txt_codes"&gt;&lt;/textarea&gt;
  
  any idea on how i can pass actual html codes?
  </code></pre>