Skip to content

@justdmitry justdmitry released this Dec 15, 2017

Extensions method added to string: MarkdownEncode(this string value).

Use it when building markdown message from parts, obtained from "unsafe" sources:

new SendMessage(message.Chat.Id, "Hello, " + message.From.Username?.MarkdownEncode() + "!")
{
        ParseMode = SendMessage.ParseModeEnum.Markdown
}
Assets 2
You can’t perform that action at this time.