Ok, I had to HtmlEncode the string before it got converted to JSON:
string imageTag = HttpUtility.HtmlEncode(string.Format(@"<img src=""{0}"" alt="""">", ImageUrl(p.Image, false)));
Now what I get for example in the returned JSON is:
[{"ImageTag":"<img src="http://www.xxx.com/cat_image/253.jpg" alt="">"},{"ImageTag":"<img src="http://www.xxx.com/cat_image/268N.jpg" alt="">"}]
but I want < and > and " to show their true values in this string. How do I do this? Obviously Flicker was able to (See the description value): http://api.flickr.com/services/feeds/photos_public.gne?format=json
I am encoding my context.Response like this:
context.Response.ContentType = "text/plain";
context.Response.Charset = Encoding.UTF8.ToString();