Problem with escape_javascript in 3.0.9rc1

Specifically, this does not work!

$("#lightbox_content").html('<%= escape_javascript(render(:partial => "form")) %>');

Is this the correct way to do JQuery html replacement using a partial? This works fine in 3.0.7.

Tony

Specifically, this does not work!

$("#lightbox_content").html('<%= escape_javascript(render(:partial => "form")) %>');

Is this the correct way to do JQuery html replacement using a partial? This works fine in 3.0.7.

I see the bug with this and can fix it in the morning if someone else doesn't beat me to it. escape_javascript should return a safe string if it's passed one to escape. The change to gsub broke it.

For now you can call raw in your template to work around it.

Apologies to the guy who reported an issue which I mistakenly closed. *blush*