You can override the OnActionExecuting System.Web.Mvc.Controller method and use the ActionDescriptor property in the ActionExecutingContext OnActionExecuting argument to determine which action is currently running. You could (I think) change ActionParameters to ActionExecutingContext to do the encoding.
Are you planning on using this to check for naughty content ( AntiXss.GetSafeHtml ), or are you also planning on coding ( AntiXss.HtmlEncode )? If this is the last, I would think about it, since it limits your output format to HTML only, which is probably right now, but could be a limitation if this data should be used elsewhere.
source share