i have an MVC 3 site using asp.net 4
in my views i have used <%= for outputting data.
reading this post by phil haack -> http://haacked.com/archive/2009/09/25/html-encoding-code-nuggets.aspx
He suggests that <%= should be a distant memory, as long as your using .net 4.
i have done a find and replace all, on one of my views replacing
<%= to <%:
and everything works as normal.
so my question, can i go ahead and do a global replace on all my views? are there any issues to be aware of ?
Truegilly
Be careful though as if you have something like this:
you might get double encoding when you end up with:
Whereas the correct would be:
Personally I tend to always use:
So, it’s not as easy as a simple search & replace. There might be some breaking modifications.