Getting Started

Starting is easy. First, either clone the repository or download the latest drop from the codeplex site.

There's three directories for you to use
  • CSharp -- these are the implementations in CSharp
  • JavaScript -- implementations in JavaScript
  • BEK -- these are the BEK high level language definitions used to create the other implementations. If you paste these in to , you can even re-generate the JavaScript code!

Using Encoders In Your Projects

We've placed each of the encoders in the namespace 'AntiXssExperimental.' Each encoder has a class definition with a static function called 'Apply.' You can include the file in your project and then use the encoder on a string like so:
using AntiXssExperimental;
string c = CssEncoder.Apply("<encode me!>"); 
string h = HtmlEncoder.Apply("<encode me!>"); 

The encoded strings will be c="\00003Cencode\000020me\000021\00003E" and h="&lt;encode me!&gt;"

Last edited May 31, 2012 at 11:45 PM by dmolnar, version 10


No comments yet.