Maybe one of the examples in __init__.py under gluon/contrib/
simplejson can help.
Otherwise post a sample of your data and how you need it.


On Dec 14, 1:28 am, spiffytech <[email protected]> wrote:
> I'm fetching data from my database, converting it to JSON with
> simplejson.dumps(), then passing it to my view to include in my
> Javascript. I need to escape the JSON vars to prevent XSS attacks
> without escaping all of the brackets, braces, and quotes that make
> JSON work.
>
> How can I do this? What I've attempted so far results in either the
> entire JSON string being escaped, or none of it. I've hacked together
> a loop that generates and prints the JSON one variable, but that's
> pretty fragile and kludgy solution. Surely there's a better way?

Reply via email to