NewGaoKaoApi/PaymentSDK/AliPay/HtmlHelpler.cs

30 lines
512 B
C#

using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
namespace PaymentSDK
{
public class HtmlHelpler
{
public static string HtmlDecode(string value)
{
var tmp = value;
#if !NETSTANDARD
return HttpUtility.HtmlDecode(tmp);
#else
return WebUtility.HtmlDecode(tmp);
#endif
}
public static string HtmlEncode(string value)
{
var tmp = value;
#if !NETSTANDARD
return HttpUtility.HtmlEncode(tmp);
#else
return WebUtility.HtmlEncode(tmp);
#endif
}
}
}