I need to return a JsonResult that contains some HTML.
so something like:
return Json(new { id="guid", html="<param id='id'/>" });
However, when I return the result, the angle brackets are encoded as u003e, u003c, etc.
I tried different encoders, but could not understand what it is. Does anyone come across this?
I can return Content (string) with Response.ContentType = "application / json" without this problem, but my json object is quite complex, and I would prefer to return JsonResult if possible.
Thanks!
source
share