Html UtilsHtml Attribute Encode(Text Writer, Read Only SpanChar, Char) Method
Encode an HTML attribute value.
Definition
Namespace: MimeKit.Text
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
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.
Remarks
Encodes an HTML attribute value.
Exceptions
| ArgumentNullException |
output is . -or- value is . |
| ArgumentException | quote is not a valid quote character. |