I needed something like is described here (a method to render a partial view to a string so I can pass it along with some other data as a JsonResult)
The top answer seems to be working well but I'm wondering if this opens a vector for XSS CSS Injection?
If it does, would it be as easy as html encoding the result before returning it to prevent it?