/// <summary> /// Initializes the HTML safe list. /// </summary> private static void InitializeSafeList() { SyncLock.EnterWriteLock(); try { if (characterValues == null) { characterValues = SafeList.Generate(0xFF, SafeList.PercentThenHexValueGenerator); SafeList.PunchSafeList(ref characterValues, UrlSafeList()); } } finally { SyncLock.ExitWriteLock(); } }
/// <summary> /// Initializes the LDAP DN safe lists. /// </summary> /// <returns>The DN safe list.</returns> private static char[][] InitialiseDistinguishedNameSafeList() { char[][] result = SafeList.Generate(255, SafeList.HashThenHexValueGenerator); SafeList.PunchSafeList(ref result, DistinguishedNameSafeList()); // Now mark up the specially listed characters from http://www.ietf.org/rfc/rfc2253.txt EscapeDistinguisedNameCharacter(ref result, ','); EscapeDistinguisedNameCharacter(ref result, '+'); EscapeDistinguisedNameCharacter(ref result, '"'); EscapeDistinguisedNameCharacter(ref result, '\\'); EscapeDistinguisedNameCharacter(ref result, '<'); EscapeDistinguisedNameCharacter(ref result, '>'); EscapeDistinguisedNameCharacter(ref result, ';'); return(result); }
/// <summary> /// Initializes the Url Path safe list. /// </summary> /// <returns>A list of characters and their encoded values for URL encoding.</returns> private static char[][] InitialisePathSafeList() { char[][] result = SafeList.Generate(255, SafeList.PercentThenHexValueGenerator); SafeList.PunchSafeList(ref result, UrlPathSafeList()); return(result); }
/// <summary> /// Initializes the CSS safe list. /// </summary> /// <returns> /// The CSS safe list. /// </returns> private static char[][] InitialiseSafeList() { char[][] result = SafeList.Generate(0xFF, SafeList.SlashThenSixDigitHexValueGenerator); SafeList.PunchSafeList(ref result, CssSafeList()); return(result); }
/// <summary> /// Initializes the LDAP filter safe list. /// </summary> /// <returns>The LDAP filter safe list.</returns> private static char[][] InitialiseFilterSafeList() { char[][] result = SafeList.Generate(255, SafeList.SlashThenHexValueGenerator); SafeList.PunchSafeList(ref result, FilterEncodingSafeList()); return(result); }