I have a problem with rendering @results from show.js.erb. Output looks like:
show.js.erb
$('#results').empty();
$('#results').html("<ul><%= escape_javascript(render(@results)).html_safe %></ul>");
_result.html.erb
<li>
<%= link_to(result.title, result.uri) %><br>
<span class="urls"><%= result.uri %></span>
</li>
Using _result.html.erb in show.html.erb:
<ul>
<%= render @results %>
</ul>
produces correct output.
The suspected culprit is <%= escape_javascript(render(@results)).html_safe %>.
I’ve tried <%= raw(escape_javascript(render@results)) %> but with no luck.
App is created with Rails 3.0.8.
Edit 1:
Longer version of show.js.erb:
$('#results').empty();
$('#results').html("<ul><%= escape_javascript(render(:partial => "results/result", :collection => @results)).html_safe %></ul>");
output stays the same as on the image with a>, li> and whatnot.
Edit 2:
HTML rendered by show.js.erb:

Edit 3:
<a href="http://jasonseifer.com/2010/04/06/rake-tutorial">Rake Tutorial | Jason Seifera><br> <span class="urls">http://jasonseifer.com/2010/04/06/rake-tutorialspan>li></span></a>
Edit 4:
without html_safe:
$('#results').empty();
$('#results').html('<ul><%= escape_javascript render(@results) %></ul>');
Output:

The </ are already eaten by escape_javascript.
Edit 5: It is working! Finally!
$('#results').html('<%= escape_javascript("<ul>#{render(@results)}</ul>").html_safe %>');
It is Dogbert’s answer with .html('') quotes and .html_safe.
Please try using this for your js.erb