CGI and external JavaScript nightmare

File Grok mogmios at
Tue Oct 16 01:16:40 CEST 2007

What's your URL for an example page that is having this error? Trying to 
figure out Google's JS is usually an example of self abuse.
> My website is built from a Python CGI and works great. I'm now
> including Google Ads, which requires two pieces of JavaScript; the
> first contains the display settings for the ads, and the second piece
> is a very lengthy garbled js file at
> The first piece of JavaScript works fine and the ads display
> correctly, however the second file throws an "unterminated string
> literal" js error. Looking at it you can see a healthy amount of both
> single and double quotes, which is where my problem lies.
> What is the best way to get the second js file into a nice printable/
> usable format? cgi.escape? xml.sax.saxutils.quoteattr? String
> substitution? I could use some guidance.
> Thank you!

More information about the Python-list mailing list