[Distutils] PEP 438 - Transition Phase 1

Donald Stufft donald at stufft.io
Mon May 20 08:26:19 CEST 2013


On May 20, 2013, at 2:21 AM, Donald Stufft <donald at stufft.io> wrote:

> 
> On May 20, 2013, at 2:18 AM, Lennart Regebro <regebro at gmail.com> wrote:
> 
>> On Sun, May 19, 2013 at 10:20 PM, Donald Stufft <donald at stufft.io> wrote:
>>> Hrm, ZPT doesn't seem to be stripping the CDATA or unescaping the strings?
>>> 
>>> https://gist.github.com/dstufft/5608838 is what i have in the template file and that appears verbatim in the output?
>> 
>> Yes? It will escape *data* inserted into the template (unless told not
>> to), but what is in the template will appear in the output unescaped.
>> I'm not sure how any template system can work otherwise, but perhaps
>> I've been using Zope too long. :-)
>> 
>> //Lennart
> 
> Maybe you can tell me what I'm doing wrong?
> 
> I need to insert a <script> tag with Javascript in it. Tres told me to put the contents of the script tag in CDATA blocks which I did, and then when the template was rendered it still had the CDATA blocks so it was invalid javascript.
> 
> He also said to just put the javascript in the body of the script but xml escape it. Which I did, and when the template was rendered the data was still xml escaped and again invalid javascript.
> 
> -----------------
> Donald Stufft
> PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
> 
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig

https://bitbucket.org/pypa/pypi/src/f1104a6d908fbf7b0c87ba2c2d24b69c68dfab0c/templates/urls.pt?at=default Here's the template I'm attempting to modify fwiw. This is the only time I've ever used zope.pagetemplates and i've spent more time cursing it than making it do what I want :/

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130520/15edcc57/attachment.pgp>


More information about the Distutils-SIG mailing list