You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2009/06/17 01:47:27 UTC

Re: partial markup renderer replaces double quotes with single quotes and encodes any enclosed single quotes...

This is part of the normal markup writer behavior for 5.1; otherwise every
double quote in the markup to be escaped. JSON requires that strings always
be in double quotes but HTML/XML does not (you can use single quotes
interchangably).

Use RenderSupport to add a $('id').observe("click", someFunction); and avoid
inline JavaScript.

On Tue, Jun 16, 2009 at 3:58 PM, Tom Zurkan <tz...@citizensportsinc.com>wrote:

> i can't find who the culprit is yet.  but, by the time i am out of
> AjaxPartialResponseRendererImpl, the content has been changed so that double
> quotes are replaced.  this seems to cause some problem with enclosed
> javascript such as onclick="somefunction('var');"  becomes
> onclick='somefunction(&apos;var&apos;);' which i think is causing problems
> on IE.  anyone know who is doing this transformation?
>
> thanks,
>
> tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

Re: partial markup renderer replaces double quotes with single quotes and encodes any enclosed single quotes...

Posted by Howard Lewis Ship <hl...@gmail.com>.
Reducing the size of the JSON response and making it more readable.

On Wed, Jun 17, 2009 at 10:54 AM, Tom Zurkan
<tz...@citizensportsinc.com>wrote:

> so, is this this just for performance purposes or are there other reasons?
>
>
> Howard Lewis Ship wrote:
>
>> This is part of the normal markup writer behavior for 5.1; otherwise every
>> double quote in the markup to be escaped. JSON requires that strings
>> always
>> be in double quotes but HTML/XML does not (you can use single quotes
>> interchangably).
>>
>> Use RenderSupport to add a $('id').observe("click", someFunction); and
>> avoid
>> inline JavaScript.
>>
>> On Tue, Jun 16, 2009 at 3:58 PM, Tom Zurkan <tzurkan@citizensportsinc.com
>> >wrote:
>>
>>
>>
>>> i can't find who the culprit is yet.  but, by the time i am out of
>>> AjaxPartialResponseRendererImpl, the content has been changed so that
>>> double
>>> quotes are replaced.  this seems to cause some problem with enclosed
>>> javascript such as onclick="somefunction('var');"  becomes
>>> onclick='somefunction(&apos;var&apos;);' which i think is causing
>>> problems
>>> on IE.  anyone know who is doing this transformation?
>>>
>>> thanks,
>>>
>>> tom
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

Re: partial markup renderer replaces double quotes with single quotes and encodes any enclosed single quotes...

Posted by Tom Zurkan <tz...@citizensportsinc.com>.
so, is this this just for performance purposes or are there other reasons?

Howard Lewis Ship wrote:
> This is part of the normal markup writer behavior for 5.1; otherwise every
> double quote in the markup to be escaped. JSON requires that strings always
> be in double quotes but HTML/XML does not (you can use single quotes
> interchangably).
>
> Use RenderSupport to add a $('id').observe("click", someFunction); and avoid
> inline JavaScript.
>
> On Tue, Jun 16, 2009 at 3:58 PM, Tom Zurkan <tz...@citizensportsinc.com>wrote:
>
>   
>> i can't find who the culprit is yet.  but, by the time i am out of
>> AjaxPartialResponseRendererImpl, the content has been changed so that double
>> quotes are replaced.  this seems to cause some problem with enclosed
>> javascript such as onclick="somefunction('var');"  becomes
>> onclick='somefunction(&apos;var&apos;);' which i think is causing problems
>> on IE.  anyone know who is doing this transformation?
>>
>> thanks,
>>
>> tom
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>
>