Click or drag to resize
MimeKit

HtmlUtilsHtmlAttributeEncode(TextWriter, ReadOnlySpan`1Char, Char) Method

Encode an HTML attribute value.

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

Parameters

output  TextWriter
The TextWriter to output the result.
value  ReadOnlySpanChar
The attribute value to encode.
quote  Char  (Optional)
The character to use for quoting the attribute value.
Exceptions
ExceptionCondition
ArgumentNullException

output is null.

-or-

value is null.

ArgumentExceptionquote is not a valid quote character.
Remarks
Encodes an HTML attribute value.
See Also