title: escape javascript doesn't work with link_to_function (rails)
body: <p>This line works fine </p>
  
  <pre><code>        &lt;%=link_to_function "name", "$('#thing_name').html('&lt;p&gt;name&lt;p&gt;')" %&gt;
  </code></pre>
  
  <p>This line doesn't</p>
  
  <pre><code>        &lt;%=link_to_function "name", "$('#thing_name').html('&lt;%= escape_javascript(thing.name) %&gt;')" %&gt;
  </code></pre>
  
  <p>Then I get rid of all the content within &lt;%= %></p>
  
  <pre><code>       &lt;%=link_to_function "name", "$('#thing_name').html('&lt;%= %&gt;')" %&gt;
  </code></pre>
  
  <p>It still keeps complaining about some weird compile errors.</p>
  
  <p>Thanks in advance.</p>