public string Sanitize(string text) { if(String.IsNullOrWhiteSpace(text)) return String.Empty; return text .Replace("*", "\\*") .Replace("_", "\\_") .Replace("1. ", "1\\. ") .Replace("#", "\\#"); }