Spark View Engine with custom HTML Helpers
问题 I've added some of my own helpers to the System.Web.Mvc within my project and got it working with the default asp.net mvc view engine. By defining the helper like namespace System.Web.Mvc { public static class XSSHelper { public static string h(this HtmlHelper helper, string input) { return AntiXss.HtmlEncode(input); } public static string Sanitize(this HtmlHelper helper, string input) { return AntiXss.GetSafeHtml(input); } public static string hscript(this HtmlHelper helper, string input) {