Escape text for HTML

using System.Web;

var encoded = HttpUtility.HtmlEncode(unencoded);

Leave a Comment