C# Класс HtmlKit.HtmlUtils

A collection of HTML-related utility methods.
A collection of HTML-related utility methods.
Показать файл Открыть проект

Открытые методы

Метод Описание
HtmlAttributeEncode ( char value, int startIndex, int count, char quote = '"' ) : string

Encode an HTML attribute value.

Encodes an HTML attribute value.

HtmlAttributeEncode ( string value, char quote = '"' ) : string

Encode an HTML attribute value.

Encodes an HTML attribute value.

HtmlAttributeEncode ( string value, int startIndex, int count, char quote = '"' ) : string

Encode an HTML attribute value.

Encodes an HTML attribute value.

HtmlAttributeEncode ( TextWriter output, char value, int startIndex, int count, char quote = '"' ) : void

Encode an HTML attribute value.

Encodes an HTML attribute value.

HtmlAttributeEncode ( TextWriter output, string value, char quote = '"' ) : void

Encode an HTML attribute value.

Encodes an HTML attribute value.

HtmlAttributeEncode ( TextWriter output, string value, int startIndex, int count, char quote = '"' ) : void

Encode an HTML attribute value.

Encodes an HTML attribute value.

HtmlDecode ( string data ) : string

Decode HTML character data.

Decodes HTML character data.

HtmlDecode ( string data, int startIndex, int count ) : string

Decode HTML character data.

Decodes HTML character data.

HtmlDecode ( TextWriter output, string data ) : void

Decode HTML character data.

Decodes HTML character data.

HtmlDecode ( TextWriter output, string data, int startIndex, int count ) : void

Decode HTML character data.

Decodes HTML character data.

HtmlEncode ( char data, int startIndex, int count ) : string

Encode HTML character data.

Encodes HTML character data.

HtmlEncode ( string data ) : string

Encode HTML character data.

Encodes HTML character data.

HtmlEncode ( string data, int startIndex, int count ) : string

Encode HTML character data.

Encodes HTML character data.

HtmlEncode ( TextWriter output, char data, int startIndex, int count ) : void

Encode HTML character data.

Encodes HTML character data.

HtmlEncode ( TextWriter output, string data ) : void

Encode HTML character data.

Encodes HTML character data.

HtmlEncode ( TextWriter output, string data, int startIndex, int count ) : void

Encode HTML character data.

Encodes HTML character data.

Приватные методы

Метод Описание
HtmlAttributeEncode ( TextWriter output, ICharArray value, int startIndex, int count, char quote = '"' ) : void
HtmlEncode ( TextWriter output, ICharArray data, int startIndex, int count ) : void
IndexOfHtmlEncodeAttributeChar ( ICharArray value, int startIndex, int endIndex, char quote ) : int
IndexOfHtmlEncodeChar ( ICharArray value, int startIndex, int endIndex ) : int
IsValidTokenName ( string name ) : bool

Описание методов

HtmlAttributeEncode() публичный статический Метод

Encode an HTML attribute value.
Encodes an HTML attribute value.
/// is null. /// /// and do not specify /// a valid range in the value. /// /// is not a valid quote character. ///
public static HtmlAttributeEncode ( char value, int startIndex, int count, char quote = '"' ) : string
value char The attribute value to encode.
startIndex int The starting index of the attribute value.
count int The number of characters in the attribute value.
quote char The character to use for quoting the attribute value.
Результат string

HtmlAttributeEncode() публичный статический Метод

Encode an HTML attribute value.
Encodes an HTML attribute value.
/// is null. /// /// is not a valid quote character. ///
public static HtmlAttributeEncode ( string value, char quote = '"' ) : string
value string The attribute value to encode.
quote char The character to use for quoting the attribute value.
Результат string

HtmlAttributeEncode() публичный статический Метод

Encode an HTML attribute value.
Encodes an HTML attribute value.
/// is null. /// /// and do not specify /// a valid range in the value. /// /// is not a valid quote character. ///
public static HtmlAttributeEncode ( string value, int startIndex, int count, char quote = '"' ) : string
value string The attribute value to encode.
startIndex int The starting index of the attribute value.
count int The number of characters in the attribute value.
quote char The character to use for quoting the attribute value.
Результат string

HtmlAttributeEncode() публичный статический Метод

Encode an HTML attribute value.
Encodes an HTML attribute value.
/// is null. /// -or- /// is null. /// /// and do not specify /// a valid range in the value. /// /// is not a valid quote character. ///
public static HtmlAttributeEncode ( TextWriter output, char value, int startIndex, int count, char quote = '"' ) : void
output System.IO.TextWriter The to output the result.
value char The attribute value to encode.
startIndex int The starting index of the attribute value.
count int The number of characters in the attribute value.
quote char The character to use for quoting the attribute value.
Результат void

HtmlAttributeEncode() публичный статический Метод

Encode an HTML attribute value.
Encodes an HTML attribute value.
/// is null. /// -or- /// is null. /// /// is not a valid quote character. ///
public static HtmlAttributeEncode ( TextWriter output, string value, char quote = '"' ) : void
output System.IO.TextWriter The to output the result.
value string The attribute value to encode.
quote char The character to use for quoting the attribute value.
Результат void

HtmlAttributeEncode() публичный статический Метод

Encode an HTML attribute value.
Encodes an HTML attribute value.
/// is null. /// -or- /// is null. /// /// and do not specify /// a valid range in the value. /// /// is not a valid quote character. ///
public static HtmlAttributeEncode ( TextWriter output, string value, int startIndex, int count, char quote = '"' ) : void
output System.IO.TextWriter The to output the result.
value string The attribute value to encode.
startIndex int The starting index of the attribute value.
count int The number of characters in the attribute value.
quote char The character to use for quoting the attribute value.
Результат void

HtmlDecode() публичный статический Метод

Decode HTML character data.
Decodes HTML character data.
/// is null. ///
public static HtmlDecode ( string data ) : string
data string The character data to decode.
Результат string

HtmlDecode() публичный статический Метод

Decode HTML character data.
Decodes HTML character data.
/// is null. /// /// and do not specify /// a valid range in the data. ///
public static HtmlDecode ( string data, int startIndex, int count ) : string
data string The character data to decode.
startIndex int The starting index of the character data.
count int The number of characters in the data.
Результат string

HtmlDecode() публичный статический Метод

Decode HTML character data.
Decodes HTML character data.
/// is null. /// -or- /// is null. ///
public static HtmlDecode ( TextWriter output, string data ) : void
output System.IO.TextWriter The to output the result.
data string The character data to decode.
Результат void

HtmlDecode() публичный статический Метод

Decode HTML character data.
Decodes HTML character data.
/// is null. /// -or- /// is null. /// /// and do not specify /// a valid range in the data. ///
public static HtmlDecode ( TextWriter output, string data, int startIndex, int count ) : void
output System.IO.TextWriter The to output the result.
data string The character data to decode.
startIndex int The starting index of the character data.
count int The number of characters in the data.
Результат void

HtmlEncode() публичный статический Метод

Encode HTML character data.
Encodes HTML character data.
/// is null. /// /// and do not specify /// a valid range in the data. ///
public static HtmlEncode ( char data, int startIndex, int count ) : string
data char The character data to encode.
startIndex int The starting index of the character data.
count int The number of characters in the data.
Результат string

HtmlEncode() публичный статический Метод

Encode HTML character data.
Encodes HTML character data.
/// is null. ///
public static HtmlEncode ( string data ) : string
data string The character data to encode.
Результат string

HtmlEncode() публичный статический Метод

Encode HTML character data.
Encodes HTML character data.
/// is null. /// /// and do not specify /// a valid range in the data. ///
public static HtmlEncode ( string data, int startIndex, int count ) : string
data string The character data to encode.
startIndex int The starting index of the character data.
count int The number of characters in the data.
Результат string

HtmlEncode() публичный статический Метод

Encode HTML character data.
Encodes HTML character data.
/// is null. /// -or- /// is null. /// /// and do not specify /// a valid range in the data. ///
public static HtmlEncode ( TextWriter output, char data, int startIndex, int count ) : void
output System.IO.TextWriter The to output the result.
data char The character data to encode.
startIndex int The starting index of the character data.
count int The number of characters in the data.
Результат void

HtmlEncode() публичный статический Метод

Encode HTML character data.
Encodes HTML character data.
/// is null. /// -or- /// is null. ///
public static HtmlEncode ( TextWriter output, string data ) : void
output System.IO.TextWriter The to output the result.
data string The character data to encode.
Результат void

HtmlEncode() публичный статический Метод

Encode HTML character data.
Encodes HTML character data.
/// is null. /// -or- /// is null. /// /// and do not specify /// a valid range in the data. ///
public static HtmlEncode ( TextWriter output, string data, int startIndex, int count ) : void
output System.IO.TextWriter The to output the result.
data string The character data to encode.
startIndex int The starting index of the character data.
count int The number of characters in the data.
Результат void