I have an aspx page that retrieves some user generated text from the database and passes to JQuery Ajax method as a JSON Object.
The JSON string it self is simple {"popContent":"<div>html content</div>"}.
The content may have elements such as single quotes, double quotes, carriage returns etc.
The problem is as I'm using .net framework 2.0, struggling to find a method that would escape these elements.
I have tried to use Json.NET to escape this. The documentation refers to serializing objects, but not clear on how to escape a string. Is this possible with Json.NET? Or should I create an object with this string and serialize that?
Thanks