Kentico: JSON serialization doesn't escape quotes

Is there a way to get the Kentico CMS JSON serializer to do the quotes correctly?

I was helping my wife debug the text cleanup routine today, and in some cases, users created HTML anchor tags in which the href target was surrounded by quotes. The JSON received was invalid, similar to this:

"news" : "some text <a href="foo.html">click here</a> more text"

      

Obviously, the extra set of quotes around "foo.html" will prevent the JSON data value from being parsed correctly. I assume they should be escaped with a slash: \ "

I'm not familiar with Kentico, but I'm wondering if there might be a switch somewhere?

+3


source to share





All Articles