| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Web;
- namespace MadRunFabric.Common
- {
- public static class EncodingHelper
- {
- /// <summary>
- /// 解码
- /// </summary>
- /// <param name="s"></param>
- /// <returns></returns>
- public static string HtmlDecode(string s)
- {
- //System.Net.WebUtility.HtmlDecode(s);
- return HttpUtility.HtmlDecode(s);
- }
- /// <summary>
- /// 编码
- /// </summary>
- /// <param name="s"></param>
- /// <returns></returns>
- public static string HtmlEncode(string s)
- {
- //System.Net.WebUtility.HtmlEncode(s);
- return HttpUtility.HtmlEncode(s);
- }
- public static string UrlDecode(string s)
- {
- return HttpUtility.UrlDecode(s);
- }
- public static string UrlEncode(string s)
- {
- return HttpUtility.UrlEncode(s);
- }
- }
- }
|