Minimally converts a string into an HTML-encoded string and sends the encoded string to a System.IO.TextWriter output stream.
- s
- The string to encode
- output
- A System.IO.TextWriter output stream.
The HttpUtility.HtmlAttributeEncode(string, System.IO.TextWriter) method converts only quotation marks ("), ampersands (&), and left angle brackets (<) to equivalent character entities. It is considerably faster than the HttpUtility.HtmlEncode(string, System.IO.TextWriter) method.
The string result from the HttpUtility.HtmlAttributeEncode(string, System.IO.TextWriter) method should be used only for double-quoted attributes. Security issues might arise when using the HttpUtility.HtmlAttributeEncode(string, System.IO.TextWriter) method with single-quoted attributes.