Click or drag to resize
MimeKit

HtmlUtilsHtmlAttributeEncode(ReadOnlySpan`1Char, Char) Method

Encode an HTML attribute value.

Namespace: MimeKit.Text
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public static string HtmlAttributeEncode(
	ReadOnlySpan<char> value,
	char quote = '"'
)

Parameters

value  ReadOnlySpanChar
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