Click or drag to resize
MimeKit

HtmlUtilsHtmlAttributeEncode(String, Char) Method

Encode an HTML attribute value.

Namespace: MimeKit.Text
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
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.
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue is null.
ArgumentExceptionquote is not a valid quote character.
Remarks
Encodes an HTML attribute value.
See Also