HtmlUtilsHtmlAttributeEncode(String, Char) Method

Encode an HTML attribute value.

Definition

Namespace: MimeKit.Text
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public static string HtmlAttributeEncode(
	string value,
	char quote = '"'
)

Parameters

value  String
The attribute value to encode.
quote  Char  (Optional)
The character to use for quoting the attribute value.

Return Value

String
The encoded attribute value.

Remarks

Encodes an HTML attribute value.

Exceptions

ArgumentNullException value is .
ArgumentException quote is not a valid quote character.

See Also