Files
telegram-bot/Core/Extensions/StringExtension.cs
T

16 lines
358 B
C#
Raw Normal View History

2020-03-01 22:46:07 +04:00
using System.Web;
2023-07-29 15:14:52 +03:00
namespace Kruzya.TelegramBot.Core.Extensions;
public static class StringExtension
2020-03-01 22:46:07 +04:00
{
2023-07-29 15:14:52 +03:00
public static string HtmlEncode(this string content)
2020-03-01 22:46:07 +04:00
{
2023-07-29 15:14:52 +03:00
return HttpUtility.HtmlEncode(content);
}
2020-03-01 22:46:07 +04:00
2023-07-29 15:14:52 +03:00
public static string HtmlDecode(this string content)
{
return HttpUtility.HtmlDecode(content);
2020-03-01 22:46:07 +04:00
}
}