Single Quotation Marks will be encoded in HtmlEncode and UrlEncode
Posted on 2/18/2010 2:00:01 PM
in #Asp.Net 4.0
Hi,
One of the small but important change in the Asp.Net 4.0 is the change is the Encode methods. Now the HtmlEncode and UrlEncode methods in the HttpUtility and HttpServerUtility class respectively also encode the single quote (‘).
The HtmlEncode method encodes instances of the single quotation mark as "'".
The UrlEncode method encodes instances of the single quotation mark as "%27".
Vikram
|