Nevermind. Figured it out right after I posed.
You use the XML function. My example becomes:
someJavascriptFunction({{=XML(simplejson.dumps(aPythonVar))}});
On Fri, Nov 19, 2010 at 12:06 PM, Mark Larsen <[email protected]> wrote:
> I'm attempting to upgrade to a new version of web2py (1.69 to 1.89.4).
>
> It seems that when the views are rendered now Web2py auto swaps any
> special HTML characters.
>
> For instance I have:
>
> someJavascriptFunction({{=simplejson.dumps(aPythonVar)}});
>
> This errors because the quotes in the aPythonVar are swapped with "
>
> someJavascriptFunction({"key": 1});
>
> How can I defeat this behavior?
>
> Thanks,
> Mark
>