Html attributes, single quote and HtmlAttributeEncode
September 11, 2007 at 11:33 am Leave a comment
When you develop your own custom controls do not forget that HtmlAttributeEncode method DOES NOTÂ encode single quote.
MSDN says:
The string result from the HtmlAttributeEncode method should be used only for double-quoted attributes. Security issues might arise when using the HtmlAttributeEncode method with single-quoted attributes.
So you should use double quotes
Trackback this post | Subscribe to the comments via RSS Feed