title: Rendering Underscore variables in Jade
body: <p>I have included the assets described in <a href="https://stackoverflow.com/questions/8528885/using-jade-templates-in-backbone-js">this ticket</a>, and the Underscore variables work except when inside tags. I can not get variables to render inside dynamic tags <code>data-id=someid</code>for doing things <code>onClick</code> with Backbone events.</p>
  
  <p>In standard HTML:</p>
  
  <pre><code>&lt;script type="text/template" id="template-action1-thing"&gt;
  &lt;tr&gt;
     &lt;td class="action-td" style="width: 10%;"&gt;
        &lt;button id="do-remove" data-id="&lt;%= obj.id %&gt;"&gt;X&lt;/button&gt;             
     &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>With (Scalate) Jade, which doesn't work:</p>
  
  <pre><code>script(id='template-action1-thing' type='text/template')
    p &lt;%= obj.id %&gt; Will render
    tr
      td.action-td(style='width: 10%;')
        button(id='do-remove' data-id='&lt;%= obj.id %&gt;') 
          | X
  </code></pre>
  
  <p>If I do <a href="https://gist.github.com/1886215" rel="nofollow noreferrer">this</a>, the <strong>actual html</strong> renders with the variable properly, though incorrectly:</p>
  
  <pre><code>tr td(style='width: 10%;') button(id='do-remove_thing' data-id='myid') X
  </code></pre>
  
  <p>With a template like:</p>
  
  <pre><code>script(id='template-action1-thing' type='text/template')
    |   td.action-td(style='width: 10%;')
    |     button(id='do-remove_thing' data-id='&lt;%= obj.id %&gt;') X 
  </code></pre>