private string SafeHtmlEncode(string content) { if (Controller.Context != null) { return HtmlEncode(content); } return content; }