AntiXssEncoder.MarkAsSafe Method (LowerCodeCharts, LowerMidCodeCharts, MidCodeCharts, UpperMidCodeCharts, UpperCodeCharts)
Marks characters from the specified Unicode code charts as safe.
Assembly: System.Web (in System.Web.dll)
Public Shared Sub MarkAsSafe ( lowerCodeCharts As LowerCodeCharts, lowerMidCodeCharts As LowerMidCodeCharts, midCodeCharts As MidCodeCharts, upperMidCodeCharts As UpperMidCodeCharts, upperCodeCharts As UpperCodeCharts )
The combination of lower code charts to mark as safe.
The combination of lower-middle code charts to mark as safe.
The combination of middle code charts to mark as safe.
The combination of upper-middle code charts to mark as safe.
The combination of upper code charts to mark as safe.
Themethod was called outside the Application_Start method in the Global.asax file.
The safe list affects all HTML XML, CSS, and URL encoding methods.
With some exceptions, Unicode code charts do not directly correspond to written languages. To add support for a specific language or set of languages often requires marking multiple code charts as safe.
To add support for the Japanese language while continuing to allow English, use the following syntax:
MarkAsSafe( LowerCodeCharts.Default, LowerMidCodeCharts.HangulJamo, MidCodeCharts.None, UpperMidCodeCharts.CjkRadicalsSupplement | UpperMidCodeCharts.CjkSymbolsAndPunctuation | UpperMidCodeCharts.Hiragana | UpperMidCodeCharts.Katakana | UpperMidCodeCharts.KatakanaPhoneticExtensions | UpperMidCodeCharts.LatinExtendedD | UpperMidCodeCharts.CjkUnifiedIdeographs, UpperCodeCharts.None);
Themethod must be called in the Application_Start method in the Global.asax file.
Available since 4.5