HtmlEncode and UrlEncode Now Encode Single Quotation Marks

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

1 Comment

Comments have been disabled for this content.