I have a JavaScript function like this in my ASP.NET MVC 3 application.
function Foo()
{
var url = "@Url.Action("MyAction", "MyController")";
alert(url);
}
I'm confused as to why the above code works. I was expecting to have to escape @Url.Action(...) inside <%= tags?