Szerkesztés

Megosztás a következőn keresztül:


System.Web.Security.AntiXss Namespace

Contains methods that you can use to encode strings in order help you protect your application against cross-site scripting (XSS) attacks and LDAP injection attacks.

Classes

AntiXssEncoder

Encodes a string for use in HTML, XML, CSS, and URL strings.

Enums

LowerCodeCharts

Specifies values for the lower region of the UTF-8 Unicode code charts, from U0000 to U0FFF.

LowerMidCodeCharts

Specifies values for the lower-middle region of the UTF-8 Unicode code charts, from U1000 to U1EFF.

MidCodeCharts

Specifies values for the middle region of the UTF-8 Unicode code charts, from U1F00 to U2DDF.

UpperCodeCharts

Specifies values for the upper region of the UTF-8 Unicode code charts, from UA8E0 to UFFFD.

UpperMidCodeCharts

Specifies values for the upper-middle region of the UTF-8 Unicode code charts, from U2DE0 to UA8DF.

Remarks

The encoding algorithms look for a prescribed set of characters that are considered safe and encode all other characters. (This is sometimes referred to as "safe-listing" or "allow-listing.")