audit wrote: >On Mon, 20 Apr 2009, Mark Sapiro wrote: > >> What errors do you get? > >This is the error that I get when I view the date and article for that >date after I put the following code into the article.html file > >%(encoding)s %(prev)s %(next)s >%(subject_html)s >%(author_html)s %(email_html)s >%(datestr_html)s
Interpolation into the template is failing. See below. [...] >This is the code I'm trying to use but get the above errors with. > ><script type="text/javascript"> >var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." >: "http://www."); >document.write(unescape("%3Cscript src='" + gaJsHost + >"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); ></script> ><script type="text/javascript"> >try { >var pageTracker = _gat._getTracker("UA-548858-10"); >pageTracker._trackPageview(); >} catch(err) {}</script> [...] >> Templates have values interpolated into them. I.e. strings like >> %(name)s, etc. get replaced by the value of 'name'. This means in >> particular that if you want to put a literal '%' character in a >> template, you have to double it ('%%'). Is this the problem? This says you need to double every '%' in the above code when adding it to the template as in document.write(unescape("%%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%%3E%%3C/script%%3E")); -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9