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