I've got an ASP.NET MVC 3 project which works with jQuery. At some point a jQuery $get()
call is made to a controller method with a return type of JsonResult
. One of the fields is an HTML field.
For some reason it doesn't return the HTML but encodes it.
I've tried HtmlEncode, HtmlDecode, HtmlString etc... - nothing works.
It's always
"\u003cp\u003e" or "&<"
and never gives the real HTML such as
<p>some paragraph</p>
So jQuery will always write down all the tags and not parse them (such as the paragraph which won't be shown as a paragraph but will be written as it is with the HTML tags). No need to say that in the DB I've got the HTML itself with no encoding.
help would be much appreciated :)
Thank