ChiakiYu.Common.Web.WebHelper.HtmlEncode C# (CSharp) Метод

HtmlEncode() публичный статический Метод

html编码

调用HttpUtility.HtmlEncode(),当前已知仅作如下转换:

< = &lt; > = &gt; & = &amp; " = &quot;
public static HtmlEncode ( string rawContent ) : string
rawContent string 待编码的字符串
Результат string
        public static string HtmlEncode(string rawContent)
        {
            if (string.IsNullOrEmpty(rawContent))
                return rawContent;

            return HttpUtility.HtmlEncode(rawContent);
        }