Encoder Methods

Microsoft AntiXSS Library

Collapse imageExpand ImageCopy imageCopyHover image

The Encoder type exposes the following members.

Methods

  NameDescription
Public methodStatic memberCssEncode
Encodes the specified string for use in Cascading Style Sheet (CSS) attributes. The return value from this function is expected to be used in building an attribute string. CSS string attributes should be quoted values.
Public methodStatic memberHtmlAttributeEncode
Encodes an input string for use in an HTML attribute.
Public methodStatic memberHtmlEncode(String)
Encodes input strings for use in HTML.
Public methodStatic memberHtmlEncode(String, Boolean)
Encodes input strings for use in HTML.
Public methodStatic memberHtmlFormUrlEncode(String)
Encodes input strings for use in application/x-www-form-urlencoded form submissions.
Public methodStatic memberHtmlFormUrlEncode(String, Int32)
Encodes input strings for use in application/x-www-form-urlencoded form submissions.
Public methodStatic memberHtmlFormUrlEncode(String, Encoding)
Encodes input strings for use in application/x-www-form-urlencoded form submissions.
Public methodStatic memberJavaScriptEncode(String)
Encodes input strings for use in JavaScript.
Public methodStatic memberJavaScriptEncode(String, Boolean)
Encodes input strings for use in JavaScript.
Public methodStatic memberLdapDistinguishedNameEncode(String)
Encodes input strings for use as a value in Lightweight Directory Access Protocol (LDAP) DNs.
Public methodStatic memberLdapDistinguishedNameEncode(String, Boolean, Boolean)
Encodes input strings for use as a value in Lightweight Directory Access Protocol (LDAP) DNs.
Public methodStatic memberLdapEncode Obsolete.
Encodes input strings to be used as a value in Lightweight Directory Access Protocol (LDAP) search queries.
Public methodStatic memberLdapFilterEncode
Encodes input strings for use as a value in Lightweight Directory Access Protocol (LDAP) filter queries.
Public methodStatic memberUrlEncode(String)
Encodes input strings for use in universal resource locators (URLs).
Public methodStatic memberUrlEncode(String, Int32)
Encodes input strings for use in universal resource locators (URLs).
Public methodStatic memberUrlEncode(String, Encoding)
Encodes input strings for use in universal resource locators (URLs).
Public methodStatic memberUrlPathEncode
URL-encodes the path section of a URL string and returns the encoded string.
Public methodStatic memberVisualBasicScriptEncode
Encodes input strings for use in Visual Basic Script.
Public methodStatic memberXmlAttributeEncode
Encodes input strings for use in XML attributes.
Public methodStatic memberXmlEncode
Encodes input strings for use in XML.

See Also