Skip to content

Instantly share code, notes, and snippets.

@dillonhafer
Created August 27, 2013 20:25
Show Gist options
  • Save dillonhafer/6358689 to your computer and use it in GitHub Desktop.
Save dillonhafer/6358689 to your computer and use it in GitHub Desktop.
XSS protection in ASP.net
<!-- ASP.NET 3.5 and below -->
<%= Html.Encode(yourStuff) %>
<!-- ASP.NET 4 -->
<%: yourStuff %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment