[ZPT] ampersand escape problem.

Michael Rowley os2mac at earthlink.net
Sat Jan 8 10:22:56 EST 2005


On Jan 6, 2005, at 1:06 PM, Florent Guillaume wrote:

> Michael Rowley  <os2mac at earthlink.net> wrote:
>> I have been researching this, but have found no solution.
>>
>> I am trying to pass a cmf Plone, Archetypes call to createObject
>> through a java window.open call, but th eproblem is, I want to specify
>> the script_id to createObject... which makes the call
>>
>> winref=window.open('http://here/createObject?
>> script_id=script&type_name=type')
>>
>> which, of course, zpt craps all over by changing it to
>> "script_id=script&amp;type_name=type"
>
> Please show us your code. Generally &amp; is the proper way to put a &
> in an URL inside HTML code.

       <input class="class" type=button value="name" onClick="onclick"  
onmouseover="onmouseover" onmouseout="return nd();"
              tal:define="query  
python:ztu.make_query(script_id=viewscript,type_name=objType);
                          url string:${createHere}/createObject?$query;
                          windowOpen string:$puID = window.open('$url',  
'$objName', '$puFeatures');
                          refFocus string:${puID}.focus();
                          onclick string:$windowOpen;;$refFocus;"
              tal:attributes="onClick onclick;
                              onmouseover string:return  
overlib('$olStatement',$olSettings);;;
                              value name;
                              class class;"/>

but I checked this out, and it gives me the same results if I type into  
the url bar

http://localhost:8080/context/createObject? 
script_id=pu_baseEdit&type_name=objType

Why I didn't do this first, I am not sure.  So I guess this is an error  
with plones createObject script.  doesn't handle the script_id referral  
correctly...  I will post this to Archetypes.


>> I found a previous bug report of this, where it is supposed to be  
>> fixed
>> when passed as the first charachter in an attributes tag... but, how  
>> to
>> I fix it above?  Or can I... (easily)
>
> What bug report was that ?

I can't find it now, but it is obviously not the problem....  Thanks  
for your time though.

Michael.

>
> Florent
>
>
> -- 
> Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
> +33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com
>



More information about the ZPT mailing list